HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

another trigger help!

07-19-2003, 02:18 AM#1
drezman
im trying to make it so when enemies of player X go into region A, after 5 seconds they get moved to region B, but then it checks if after 4 seconds if the enemy is still in region A before it moves them, but i cant get the triggers right....
07-19-2003, 06:41 AM#2
Sinzar
im not quite sure what your asking?

Quote:
im trying to make it so when enemies of player X go into region A, after 5 seconds they get moved to region B


ok easy enough

Quote:
but then it checks if after 4 seconds if the enemy is still in region A before it moves them


why are you checking if they are still in region A? what is the end result you want~
07-19-2003, 07:22 AM#3
Hivemind
Event

Unit enters region 1

Conditions

Unit owned by player X

Actions

Wait 4 gametime seconds

move unit instanly to center of region 2
07-19-2003, 07:35 AM#4
LeprechaunNinja
OK, first you'll need to create two variables. One is "TeleportGroup". Its type is Unit Group, it has no initial value, and it is not an array. The second is a Boolean called "Waited." Its initial value should be false, and it is not an array.

Now, create three triggers with the following code:

[]Test Enter
[> Events
[-] Unit - A unit enters Region A <gen>
>] Conditions
[-] ((Owner of (Triggering unit)) is an enemy of Player 1 (Red)) Equal to True
/_ Actions
[-] Unit Group - Add (Triggering unit) to TeleportGroup
[-] Set Waited = True
[-] Wait 4.00 seconds
[-] Trigger - Run Teleport <gen> (checking conditions)

[]Test Leaving
[> Events
[-] Unit - A unit leaves Region A <gen>
>] Conditions
[-] ((Triggering unit) is in TeleportGroup) Equal to True
/_ Actions
[-] Set Waited = False

[]Teleport
[> Events
>] Conditions
[-] Waited Equal to True
/_ Actions
[-] Wait 1.00 seconds
[-] Unit - Unit Group - Pick every unit in TeleportGroup and do (Unit - Move (Picked unit) instantly to (Center of Region B <gen>))




I think that's what you're looking for. Eh? The group to be transported has to step in as a group, then if one leaves, the timer resets. Once it reaches four seconds, it's too late! Run if you can, in one second they will all be teleported.
Is that what you were trying for?
Tell me if you need anymore help.
07-19-2003, 09:14 PM#5
drezman
thx it wrked