Warcraft III resources & community, 2003–2006 · archived

Timers

8 posts
#1

Timers

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?
#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...
#3
This is just my idea:

REVIVE
E: a unit of player 1 dies
C: unit type of dying unit=hero
A:
turn on TIME
wait xx sec
revive dying unit/hero at the position of xx

TIME
E: MI
C:
turn off this trigger

Countdown Timer - Start Player1Timer as a One-shot timer that will expire in xx sec (note: xx sec=xx sec in REVIVE)

Countdown Timer - Create a timer window for Player1Timer with title (Name of (Owner of (Dying unit)))

Wait xx sec

Hide timer window for (Player1Timer)
#4
I have about 10 other people playing this map at the same time.
#5
This should work

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)))]

Make sure that both variables have arrays of 12

Have fun :wink: 8)
#6
In my opinion, you should use the event firing off of the Countdown Timer expiring for the most accurate revival.
#7
problem.
timer window and timer use different varaibles.
#8
Ya someone needed the same help go Here
and then read it all