I am working on an auto hero-revive system and it doesn't seem to be working out properly.
The hero revive works perfectly fine for Player 1, but it seems to cause a build up of timers with no actual digits in the timer, when a player other than Player 1 dies. Other players that die also don't get their heroes back.
I also want to isolate it so that the computers (Players 11 and 12) don't get their heroes back. I'd like some suggestions on how to change my triggers to make it do that.
Here are the triggers I am using to revive heroes in my map:
Here are the Variables I am using:
ReviveTimers : timer
Array:1
New Timer (Default)
Revivable Heroes : Unit Group
Empty Unit Group (Default)
PlayersResistance : Player Group
Empty Player Group (Default)
TempReal : Real
0 (Default)
RevivableTimersWindows : Timer Window
Array:1
None
Please help me and thank you in advance.
The hero revive works perfectly fine for Player 1, but it seems to cause a build up of timers with no actual digits in the timer, when a player other than Player 1 dies. Other players that die also don't get their heroes back.
I also want to isolate it so that the computers (Players 11 and 12) don't get their heroes back. I'd like some suggestions on how to change my triggers to make it do that.
Here are the triggers I am using to revive heroes in my map:
-
Revive Hero
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Dying unit) is A Hero) Equal to True
-
-
Actions
-
Unit Group - Add (Dying unit) to RevivableHeroes
-
Set TempReal = (((Real((Hero level of (Dying unit)))) x 3.00) + 5.00)
-
Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Dying unit)))
-
Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
-
Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
-
-
Else - Actions
-
-
-
-
Revive Hero Timer
-
Events
-
Time - ReviveTimers[1] expires
-
Time - ReviveTimers[2] expires
-
Time - ReviveTimers[3] expires
-
Time - ReviveTimers[4] expires
-
Time - ReviveTimers[5] expires
-
Time - ReviveTimers[6] expires
-
Time - ReviveTimers[7] expires
-
Time - ReviveTimers[8] expires
-
Time - ReviveTimers[9] expires
-
Time - ReviveTimers[10] expires
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in RevivableHeroes and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Picked unit)) is in PlayersResistance) Equal to True
-
-
Then - Actions
-
Countdown Timer - Destroy (Last created timer window)
-
Hero - Instantly revive (Picked unit) at (Center of Hero Revive <gen>), Show revival graphics
-
Camera - Pan camera for (Owner of (Picked unit)) to (Center of Hero Revive <gen>) over 0.00 seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Here are the Variables I am using:
ReviveTimers : timer
Array:1
New Timer (Default)
Revivable Heroes : Unit Group
Empty Unit Group (Default)
PlayersResistance : Player Group
Empty Player Group (Default)
TempReal : Real
0 (Default)
RevivableTimersWindows : Timer Window
Array:1
None
Please help me and thank you in advance.