Warcraft III resources & community, 2003–2006 · archived

Why isn't this trigger working

8 posts
#1

Why isn't this trigger working

Event-
Unit owned by player 1 (red) dies
Unit owned by player 2 (blue) dies
Unit owned by player 3 (teal) dies
Unit owned by player 4 (purple) dies

Condition-
number of units in Team1PeopleAlive equal to 0

Event-
Pick every unit in Duel <gen> and to (actions)
Loop - Actions
Pause Picked Unit
Create a special efect (dark conversion) on overhead of unit
wair 2 seconds
Create a special efect (Mass Teleport) on overhead of unit
wait 2 seconds
unpause picked unit
move picked unit to Left Side <gen>
#2
You condition looks a bit odd. Variables can be tricky to work with in conditions. Looks like its waiting for units in a unit group to not exist before casting effects on...well...the unit group.
-VGsatomi
#3
Remember that dead units still belong to the unit group and are NOT removed. Change it to Number of Living units (has to be something like this, dunno the exact syntax).
#4
maby i wasn't clear enough... this is a duel with everyone involved. the trigger is basicly saying when one team dies do the actions for the other team if you can see now...
#5
yeah, but what Dark was saying is that even though a unit dies, it still belongs to the unit group

so assuming (Team1PeopleAlive) contains all units from P1/2/3/4 this trigger won't actually fire under whats going on

essentially this only occurs when a unit dies, but a unit will always still be in the unit group when it dies (maybe exploding them is different, but thats besides the point)

anyways you may want to remove the dying unit from the group and then do a check in an if block
#6
I want to help but first I want to ask you. What exactly do you want to happen when a unit owned by a player dies? I think you need to make a separate trigger for every player.
#7
About what you all said about the unit still being in the unit group i have another trigger that takes them out when they die.
#8
Im woundering. how is something going to die when there is zero units alive condition. Lets say that last unit died the condition is preventing the trigger from running. Maybe if Teamoneunitalive or whatever variable was equal to one then a unit dies it could run.