ferkhat
  • ferkhat
  • 53% (Neutral)
  • Private Topic Starter
18 years ago
hey guys i was making a aod map so i did the map and it is time for me to do the scripts so idont know how to do the aod map scrpts can some oen help
Sponsor
fleetatks
18 years ago
The best way to learn is by oppenning other peoples maps to see how they did it. Here are some basics that should help though...



MAKING A UNIT SPAWN LATER IN GAME

Place a waypoint on the map were you want your unit(s) to spawn later in the game, (place about 1 waypoint per 5 units, so they don't get stuck.) And then you can do this in one of two ways. The first method is to go to scripts and create a new script with these settings:

If
'True'

Actions if true
(Go to Scripts->Timer->Set timer to expire)
"Set timer 'Timer01' to expire in '##' seconds."

Then create another script (not action) with these settings:

If
'Timer01 has expired'

Actions if true
(Go to unit->Spawn->(Select the one that best suites you.) (Team= Will spawn on a team, is you, and for the computer pick one like 'SkirmishAmerica' and it will spawn for the computer that is USA.) (Named= Create a named object, like if you had placed it in worldbuilder and givin it a name, so you could do soemthing to it in scripts.)
(orientation= What angle it's facing)
And pick the unit by clicking "unit/object of type '???'"

That's the first way to do it, the second is more for an AOD, if you wish to know how to do that one instead, Keep reading.

you place a waypoint on the map were you want your unit(s) to spawn later in the game, (place about 1 waypoint per 5 units, so they don't get stuck.) And then you can do this in one of two ways. The Second method is:
Go to teams, click the faction that you want to give the unit(s) to (example: SkirmishAmaerica) and create a new team. Then choose the unit(s) you want and the Number of them you want to apear each time you tell them to in scripts.

Then go to scripts and create a new script with these settings:
If
'True'

actions if true
(Go to scripts->Timer->Set timer to expire)
"Set timer 'Timer01' to expire in '##' seconds."

Then create another script (not action) with these settings:

If
"Timer01 has expired"

Actions if true
(Team->Spawn->Spawn an instance of team??? at a waypoint)
"Spawn an instance of team 'Your team name' at waypoint 'Waypoint you placed'"



MAKING UNIT(S) FOLLOW A WAYPOINT PATH/PATROL AN AREA

Place your unit(s) were you want them to move to/patrol (perferable close together, or on the same path it leads on)
Then Place a Waypoint Path (place a waypoint then click and drag from that waypoint to new one) Note: If you want them to patrol an area forever (or until told to stop) Make the last waypoint connect to the first (or if you want them to move to an area then patrol that one put it so its connected to the waypoint you want)
Then click on one of your waypoints and in the object property box, you should see "Waypoint Labels" and 4 spaces under it. Click the first space and type in something (example: Patrol)
Then click your unit(s) and give them each a unique name. Note: Each unit needs to be on a waypoint in the path (not on the arrow) If this is not what you had in mind keep reading.

Then in scripts create a new script in plyrcivilian with these settings:

If
'True'

Then
(Go to Unit->Move->Set a specific unit to EXACTLY Follow a Waypoint path.)
"Unit exactly follow waypoint path "

Then keep doing until all the units have been set to patrol/move.


MAKING UNIT(S) MOVE TO A LOCATION
Place your units on the map and give them each a unique name. Place a waypoint to were you want them to move, and give it a name.

Then go into scripts and make a new script in plyrcivilian with these settings:

If
'True'

Then
(Go to Unit->Move->Move a specific unit to a location)
"Move unit to

Extra: If you want a unit to move to a waypoint, then patrol a path, then place an area around the waypoint and give it a name, then do the scripts from #3, but change the 'true' to (Unit->Area->Unit enters an area)"'Unit' enters 'area'"

Email me if you ever need help (edited signature November 6th, 2014)
ferkhat
  • ferkhat
  • 53% (Neutral)
  • Private Topic Starter
18 years ago

Actions if true
(Team->Spawn->Spawn an instance of team??? at a waypoint)
"Spawn an instance of team 'Your team name' at waypoint 'Waypoint you placed'"


there is UserPostedImage scripts like that u shouwed me