PDA

View Full Version : Need help with map


civian
07-24-2007, 11:47 AM
Hello...

I am trying to make a small shell map.
The problem is the camera movement. It has to be a circle, because its a shellmap...
The first circle is nor problem, but how to i get the camera to move a second, third, etc... time...?

If u want, download the map and have a look...

thx...

chaoscontrol512
07-25-2007, 01:51 AM
You should probably look at the scripts in the shell map that's in the game. If I recall, there is a waypoint path, and there are scripts that tell the camera to move to the next waypoint within a certain amount of time as well as look towards the next waypoint while moving. Make a timer that expires in the same amount of time that it takes to move from one WP to the next. Then make a script that, when the timer expires, tells the camera to move to the next WP, and so on. You will also need to make a script that tells all other timers except the first one to stop, or else all of the camera scripts will fire at once.

Me Myself & Pi
07-25-2007, 09:31 AM
Here's a nice little trick I learned looking at the Zero Hour shell map awhile ago in making repeating scripts:

1) Now first, put the timer scripts, in with your camera scripts. So in your first camera script, "Move camera to Waypoint 'cam1'" set a timer to expire for the next script, "Move camera to Waypoint 'cam2'" & in that script, set a timer to expire for the next script, & so on & so forth... On the last script, set a new timer to expire for the time the camera moves. Now create a new script that wait for this timer to expire. I'll tell you what that action is for in a minute.
2) Make each script is checked with "disable apon succes".
3) Go to your first script "Move camera to Waypoint 'cam1'" & create a new action "Scripting\Script\Enable script."
4) In this action select the next script "Move camera to Waypoint 'cam2'" Do this for all the script, have one enable the one right after it. When you come to the last script, (The one you created above.) have it enable the first script of the loop. Now it'll work!

Now let me explain this because you're probably confused why you should enable a script that's enabled by default. After each scripts' condition is met, it gets disabled, (because you have checked "disable apon succes".) So when all your script have been gone through to the last one, they'll all be disabled, but in your last script, you enabled the first one, & the script starts over, & that one enables the next script & so on & so forth.

Now, please try to get the scripts working as I've said. Just try. If you can't fiqure it out. Come back to me & I'll modify your scripts for you. After I do that, I want you to study them, mabey my instruction above will make more sence to you. Then you should be able to make your own looping scripts.

Don't hesitate to come back to us with any more questions.

chaoscontrol512
07-25-2007, 02:13 PM
Yeah, basically, you make it so that the actions of script one are the triggers for script two, and the actions for script two are the triggers for script one. You can have more than two scripts for this, just make sure it always comes back to the same place in which it started. Did that make any sense? :p

civian
07-25-2007, 03:36 PM
Here's a nice little trick I learned looking at the Zero Hour shell map awhile ago in making repeating scripts:

1) Now first, put the timer scripts, in with your camera scripts. So in your first camera script, "Move camera to Waypoint 'cam1'" set a timer to expire for the next script, "Move camera to Waypoint 'cam2'" & in that script, set a timer to expire for the next script, & so on & so forth... On the last script, set a new timer to expire for the time the camera moves. Now create a new script that wait for this timer to expire. I'll tell you what that action is for in a minute.
2) Make each script is checked with "disable apon succes".
3) Go to your first script "Move camera to Waypoint 'cam1'" & create a new action "Scripting\Script\Enable script."
4) In this action select the next script "Move camera to Waypoint 'cam2'" Do this for all the script, have one enable the one right after it. When you come to the last script, (The one you created above.) have it enable the first script of the loop. Now it'll work!

Now let me explain this because you're probably confused why you should enable a script that's enabled by default. After each scripts' condition is met, it gets disabled, (because you have checked "disable apon succes".) So when all your script have been gone through to the last one, they'll all be disabled, but in your last script, you enabled the first one, & the script starts over, & that one enables the next script & so on & so forth.

Now, please try to get the scripts working as I've said. Just try. If you can't fiqure it out. Come back to me & I'll modify your scripts for you. After I do that, I want you to study them, mabey my instruction above will make more sence to you. Then you should be able to make your own looping scripts.

Don't hesitate to come back to us with any more questions.

Great! I`ve got it!

I´m very happy about that there are really people outside who have advanced knowledge of the worldbuilder... :)

Here is the well-working map...:

civian
07-30-2007, 10:30 AM
Ok, I`ve continued working on this map and there are some new problems...
I want to use different zoom and pitch settings. During the last camera view, they should change to the settings used in the setup - script...

Please have a look at the map und You will see that it doesnt match during the second or third loop...

The other problem are the amphvehicels. They should move along a waypointh... but they just get spawned...

I used the same script with some cargo planes and it worked very well, so whats up with this vehicles...?

Thy for your help... :-)

Me Myself & Pi
07-30-2007, 10:36 PM
I'm not sure what your worried about in your camera moves. They seem fine to me, continuing in a perfect loop. I took a screen shot at game start & took another one at the end/start of a loop, I compared them I they seemed fine.

The other problem are the amphvehicels. They should move along a waypoint... but they just get spawned...

The script that waits for the hover crafts to enter the area after being spawned, is waiting for that team to enter it by air. Last I checked, those hover crafts were on the ground. So go to the condition in the script "move cargos". Click on the Surface Allowed & select "Ground" or "Ground or Air" & it should work fine.

Here's a little trick I've learned with scripting. When you have multiple actions in a script, the script will activate them one at a time in order, but it does them all in the same instint. That may have sounded a little confusing but I think it'll clear up. So with this in mind, you can spawn a unit, then in an action right after that, you can tell unit to move & it will in the game! But if you put the action that makes it move before the action that spawns it, it won't move. It's just like telling a guy to do something before he walks into a room you're in. He won't know you said it because he was outside the room. This same concept applies to camera moving too. You can position a camera some place, & in an action right after that, you can tell the camera to move. Also, if you tell a unit to go to two location through two actions in the same script, the unit will to go the location that the second action told him. But all the actions will actavate at the same time. But the way you arrange them will affect how they actavate. So you could change these scripts that you have in your map from:

move cargos:
*** IF ***
Team 'cargo1' is all inside area 'area_cargo' (Surfaces Allowed: Ground or Air).
*AND* Team 'cargo2' is all inside area 'area_cargo' (Surfaces Allowed: Ground or Air).
*AND* Team 'cargo3' is all inside area 'area_cargo' (Surfaces Allowed: Ground or Air).
*** THEN ***
Have Team 'cargo1' EXACTLY follow Waypoint Path 'way_cargo1' , as a team is TRUE
Have Team 'cargo2' EXACTLY follow Waypoint Path 'way_cargo2' , as a team is TRUE
Have Team 'cargo3' EXACTLY follow Waypoint Path 'way-cargo3' , as a team is TRUE

spawn_cargo:
*** IF ***
True.
*** THEN ***
Spawn an instance of Team 'cargo1' at Waypoint 'spawn_cargo1'.
Spawn an instance of Team 'cargo2' at Waypoint 'spawn_cargo2'.
Spawn an instance of Team 'cargo3' at Waypoint 'spawn_cargo3'.

To:

spawn_cargo
*** IF ***
True.
*** THEN ***
Spawn an instance of Team 'cargo1' at Waypoint 'spawn_cargo1'.
Spawn an instance of Team 'cargo2' at Waypoint 'spawn_cargo2'.
Spawn an instance of Team 'cargo3' at Waypoint 'spawn_cargo3'.
Have Team 'cargo1' follow Waypoint Path 'way_cargo1' , as a team is FALSE
Have Team 'cargo2' follow Waypoint Path 'way_cargo2' , as a team is FALSE
Have Team 'cargo3' follow Waypoint Path 'way-cargo3' , as a team is FALSE

& the same thing will happen! Now I'm not saying you should change these two scripts, but it'll make script making faster in the future. Although you try to make this new script for practice.

civian
07-31-2007, 06:47 AM
The script that waits for the hover crafts to enter the area after being spawned, is waiting for that team to enter it by air. Last I checked, those hover crafts were on the ground. So go to the condition in the script "move cargos". Click on the Surface Allowed & select "Ground" or "Ground or Air" & it should work fine.



:irked::irked::irked:... what a stupid mistake...