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

Help me with a trigger

Status
Not open for further replies.
Level 2
Joined
Mar 21, 2007
Messages
11
Does anyone know how to make a trigger where it will move all the units one player has to a region.

For example:
Events:
If variable Blank becomes 1.00
Conditions:
Actions:
Move all units owned by player red to Blank <gen>
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Move Units

To move all units of a certain player to a specific region use a variation of this trigger:

  • Move Units
    • Events
      • Time - Elapsed game time is 15.00 seconds
    • Conditions
    • Actions
      • Set region = (Center of Region 000 <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Move (Picked unit) instantly to region)
      • Custom script: call RemoveLocation(udg_region)
Specify an event that meets your needs.

Note: "region" is a point variable.
 
Level 8
Joined
Feb 4, 2007
Messages
389
I think what he was asking is how he would check if his variable was equal to 1.

This should work (Done without WE)

E-
Every x seconds of game

C-
IntegerVar is less than or equal to 1.00

A-
Set region = (Center of Region 000 <gen>)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Move (Picked unit) instantly to region)
Custom script: call RemoveLocation(udg_region)
 
Status
Not open for further replies.
Top