HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

triggers!!!!!!!!

07-20-2003, 03:10 PM#1
drezman
im trying to make it so when an enemy of Player A, enters region X it gets moved to region Y, but if the enemy is not in region X for 5 seconds it doesnt move him.
07-20-2003, 03:33 PM#2
Fragmentation
The trigger is this

Event:

- Unit Enters Region X

Condition:

- Owner of triggering unit equal to enemy of Player A

Action:

- Turn on Trigger 1 <gen>



and this is Trigger 1

Event:

- Elapsed game time is 5 seconds

Action:

- Move unit instantly to Region Y over a time period of 0 seconds





for if the unit leaves the region and therefore doesnt teleport him you can do this

this is another separate trigger to run in conjunction with the above ones in the event the enemy of player A leaves the region

Event:

- Unit leaves Region X

Condition:

- Owner of triggering unit equal to enemy of Player A

Action:

-Turn off Trigger 1 <gen>


there we go should work
07-20-2003, 04:53 PM#3
LeprechaunNinja
I've already answered a question similiar to this. Except this script makes them stay in the region for 4 seconds. If they stay on it for 4 seconds, they'll be teleported one second later (even if they move off). If you don't want this effect, change the 4 seconds to 5 seconds and delete the second wait command.

Here's what my post contained.


-----------------------------------------


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-20-2003, 05:09 PM#4
drezman
i tryed all of your trigger ideas but none of them worked, they dont even move
07-20-2003, 05:18 PM#5
Fragmentation
drez I dont see where the problem is

maybe you forgot to tell us something

my set of triggers should work in your situation
07-20-2003, 05:22 PM#6
toochaos
this is inte*estin* eve*y *the* lette* i see as sta*s s* i wish i **ul* kn*w whats **in* *n in this p*st
07-20-2003, 06:19 PM#7
drezman
ok, wat im trying to do exactly is make an anti-camping thing for a hero arena, when an enemy of player 1 goes into region anticamp1 i want it to wait 5 seconds, until moving the unit to the center arena, but if the leaves the region before that 5 second limit, the unit does not get moved. First i tryed LeprechaunNinja's but that just made every1 on my team get moved when one of us went into that region, so i deleted all of the triggers for that one. Then i tryed NightBlade's but that didnt work, im guessing somehow after Leorechaun's the moving trigger just stoped working because, when i tryed my original idea which was crude but it worked to some very small degree, but that didnt even work anymore, forsome reason, the units dont even get moved when entering the region anymore and it used to.
07-20-2003, 06:32 PM#8
Fragmentation
drezman trust me my triggers should be working

you say that somehow nothing is working anymore

maybe something happened

delete leprechauns triggers all of em and try again, or what you can do make a new map and test my trigger with a basic region and see if it initially will work at all
07-20-2003, 06:50 PM#9
drezman
i did delete everything i made from lep's idea, but still doesnt work, i dont know wat went wrong......hmm....i think i also had to reinstall but i dont think that has anything to do with the trigger not working.
07-20-2003, 07:55 PM#10
LeprechaunNinja
Do what NightBlade said but isntead of "Elapsed Game Time = 5 seconds" do an action that just says "Wait 5 seconds"
07-20-2003, 09:44 PM#11
drezman
wait, ur idea wont work. elapsed game time=5 seconds would be a one shot deal, not mult, and i couldnt do a wait b/c i would need an event.