• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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)?
 
Level 10
Joined
Feb 22, 2008
Messages
619
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.
 
Level 9
Joined
Jun 25, 2009
Messages
427
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?
 
Level 6
Joined
Mar 22, 2009
Messages
276
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.
Top