Ok, i want a timer that tells how long until a hero is to be revived. TimerWindow Events Unit - A unit owned by Player 1 (Red) Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Countdown Timer - Start Player1Timer as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 3.00) seconds Countdown Timer - Create a timer window for Player1Timer with title (Name of (Owner of (Dying unit))) Wait ((Real((Hero level of (Dying unit)))) x 3.00) game-time seconds Countdown Timer - Destroy Last Created Timer Window
you obviously see the problem with this, because if another hero dies, then it wont destroy the timer for the first hero. what do i do to fix this?
143 posts Somewhere in Asia...guess where... joined
#2
I don't think you should destroy the timer window... Here's my suggestion...
Events Unit - A unit owned by Player 1 (Red) Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Countdown Timer - Start Player1Timer as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 3.00) seconds Countdown Timer - Create a timer window for Player1Timer with title (Name of (Owner of (Dying unit))) Wait - 3.0 seconds Hide timer window for (Player1Timer)
.....When the timer expires in 3 seconds, it can be restarted with the same event...I think...
Timer window Events Unit - A unit Dies Conditions ((Dying unit) is A Hero) Equal to True Actions Countdown Timer - Start Death_Timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (Real((Hero level of (Dying unit)))) seconds Countdown Timer - Create a timer window for Death_Timer[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit))) Wait (Real((Hero level of (Dying unit)))) seconds Countdown Timer - Destroy Death_window[(Player number of (Owner of (Dying unit)))]