Problem with destroying a countdown timer

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
Ok so I made a countdown timer that is set to 15 + the heros max life/100. The countdown timmer starts, but if another hero dies before that timmer ends both timmers go to the second one's time. Also when one timer ends none of the others will. That is beceause all I can do is destroy last created timer window.
 

AgentPaper

From the depths, I come.
Reaction score
107
i beleive you can make variable for the timers and/or timer windows
 

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
Ya I made a variable for the timer and the timer window, but couldn't figure out how to set that timer window to the variable.
 

SomeGuy333

New Member
Reaction score
6
in the same trigger as the create timer, right after it put "set (variable) = (last created timer window)

have the variable set to type timer window.
 

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
There is no spot to do that.

Hero Revive
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Countdown Timer - Start Timer as a One-shot timer that will expire in (15.00 + ((Max life of (Dying unit)) / 100.00)) seconds
Countdown Timer - Create a timer window for Timer with title (((Name of (Owner of (Dying unit))) + 's) + back in:)
Wait (15.00 + ((Max life of (Dying unit)) / 100.00)) seconds
Countdown Timer - Destroy Window
Hero - Instantly revive (Dying unit) at (Center of (Initial camera bounds)), Show revival graphics
 

xPheRe

New Member
Reaction score
43
After the waiting, (Dying unit) and (Last created timer window) could have been changed.
I think you should split the trigger in two: the first when a unit dies, the second when the timer expires.
Or store (Dying unit) and (Last created timer window) [[and maybe also (Last started timer)]] in local variables.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Heres a revive trigger with window that i use

Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dying unit) Equal to (<your unit here>)
Then - Actions
Game - Display to Player Group - Player 1 (Red) for 30.00 seconds the text: Your hero will revi...
Countdown Timer - Start (Create a periodic One-shot timer lasting 30.00) as a One-shot timer that will expire in 30.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Hero Revive
Set TimerWindow = (Last created timer window)
Wait 30.00 seconds
Countdown Timer - Destroy TimerWindow
Hero - Instantly revive (<your hero here>) at ((Owner of (Dying unit)) start location), Show revival graphics
Else - Actions
Do nothing
TimerWindow=TimerWindowVariable
<your hero here>=Put your hero here

~:D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top