Hey everyone I have a map that I am making and it uses a code that makes it so when a hero dies it adds +1 to a variable. When that variable reaches the number of players in game (So if there were ten players in the game it would have to reach 10) it would revive all heros at a certain spot then make them invulnerable.
Variables:
Code(s):
1,
2,
It just won't work, it adds +1 to the variable, because it says a message when it triggers. When we all die, it doesn't show a message which means it didn't happen.
Variables:
Code:
Deadheros - Integer - 0 Default
Code(s):
1,
Code:
All Dead
Events
Conditions
DeadHeros Equal to (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))
Actions
Trigger - Turn off Alien Flying <gen>
Trigger - Turn off Aliens <gen>
Trigger - Turn off Aliens Boss 1 <gen>
Trigger - Turn off Poisend <gen>
Trigger - Turn off Virus Lord <gen>
Unit Group - Pick every unit in DeadGroup and do (Actions)
Loop - Actions
Hero - Instantly revive (Picked unit) at (Random point in Save Area <gen>), Hide revival graphics
Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
2,
Code:
Death Heros
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set DeadHeros = (DeadHeros + 1)
Unit Group - Add (Dying unit) to DeadGroup
Trigger - Run All Dead <gen> (checking conditions)
It just won't work, it adds +1 to the variable, because it says a message when it triggers. When we all die, it doesn't show a message which means it didn't happen.