• 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.

[Trigger] I need help for very easy that i cant just solve -.-

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
Do you need a trigger to select a group of units and then instantly move them to a random location?

If so then this should do it.

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
        • Set TempPoint = (Random point in (Playable map area))
        • Unit - Move (Picked unit) instantly to TempPoint
        • Custom script: call RemoveLocation(udg_TempPoint)
The TempPoint variable is a point variable.

If you're making a short map you can exclude the anti-leak triggers.

  • Actions
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
        • Unit - Move (Picked unit) instantly to (Random point in (Playable map area))
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Move
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Random 1 units from (Units in (Playable map area))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Random point in (Playable map area))



Kill the leaks with the version above.
 
Status
Not open for further replies.
Top