- Joined
- Nov 24, 2004
- Messages
- 70
Hi, well I was reading the Forums of wc3sear.ch and well i came across a nifty hero death timer and i thought hey that would be sweet in my map, anyways I tossed it in and well im having an issue with it and a quick fix would be appreciated a bunch. THIS trigger i have no clue on how to fix so I could use some help.
hero timer
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set hero_to_be_revived = (Unit-type of (Dying unit))
Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: (|CFF00FF00Your Hero Will Be Revived In + ((String((Hero level of (Dying unit)))) + |CFF00FF00Seconds.))
Countdown Timer - Start death_time[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (3.00 x (Real((Hero level of (Dying unit))))) seconds
Set death_time[(Player number of (Owner of (Dying unit)))] = (Last started timer)
Countdown Timer - Create a timer window for death_time[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
Wait (Real(((Hero level of (Dying unit)) x 3))) seconds
Hero - Instantly revive (Dying unit) at ((Owner of (Dying unit)) start location), Show revival graphics
Countdown Timer - Destroy (Last created timer window)
------------------------------------------------------------------------------------
Anyways the problem with that is as you can see is this "Countdown Timer - Destroy (Last created timer window)" If another hero dies while one hero is still in the countdown, it will destroy the last hero's timer window and not the previous so I end up having like 20 Timer windows at the top of my map. :? unfortunatly, I don't know of any alternatives to destroying a timer window other than last created so plz help.
hero timer
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set hero_to_be_revived = (Unit-type of (Dying unit))
Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: (|CFF00FF00Your Hero Will Be Revived In + ((String((Hero level of (Dying unit)))) + |CFF00FF00Seconds.))
Countdown Timer - Start death_time[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (3.00 x (Real((Hero level of (Dying unit))))) seconds
Set death_time[(Player number of (Owner of (Dying unit)))] = (Last started timer)
Countdown Timer - Create a timer window for death_time[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
Wait (Real(((Hero level of (Dying unit)) x 3))) seconds
Hero - Instantly revive (Dying unit) at ((Owner of (Dying unit)) start location), Show revival graphics
Countdown Timer - Destroy (Last created timer window)
------------------------------------------------------------------------------------
Anyways the problem with that is as you can see is this "Countdown Timer - Destroy (Last created timer window)" If another hero dies while one hero is still in the countdown, it will destroy the last hero's timer window and not the previous so I end up having like 20 Timer windows at the top of my map. :? unfortunatly, I don't know of any alternatives to destroying a timer window other than last created so plz help.