Move All units

Status
Not open for further replies.
Level 3
Joined
Mar 7, 2010
Messages
29
Hi I m trying to create a map but i dont know this:

how i do somethings (i m too noob i can use a bit the triggers and if the command isn't a triggers teach me ad do it) thet when i write ex:center or i press an icon all unit go to center(not teleport)?
 
You can't do it with anything but triggers but here is how you would do it with triggers:
  • Events - Player - Player 1 (Red) types a chat message containing Center as An exact match
  • Actions - Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Order (Picked unit) to move to (Center of (Playable map area)))
That will make it so that if Player 1 (Red) typed Center, all the units on the map will be ordered to walk to the center of the map, you can change the "(Units in (Playable map area))" to the units that you want to be ordered to the center of the map, you can change the "(Center of (Playable map area))" to change where the units go and you can change the "Center" to change what you have to say to make it happen.
 
You can't do it with anything but triggers but here is how you would do it with triggers:
  • Events - Player - Player 1 (Red) types a chat message containing Center as An exact match
  • Actions - Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Order (Picked unit) to move to (Center of (Playable map area)))
That will make it so that if Player 1 (Red) typed Center, all the units on the map will be ordered to walk to the center of the map, you can change the "(Units in (Playable map area))" to the units that you want to be ordered to the center of the map, you can change the "(Center of (Playable map area))" to change where the units go and you can change the "Center" to change what you have to say to make it happen.

Wouldn't it leak?
 
It will leak.
Just set variables for the locations and remove the leaks with
  • custom script: call RemoveLocation(udg_VARIABLE)
 
Status
Not open for further replies.
Back
Top