HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Timer thing

10-13-2006, 04:50 AM#1
Av3n
I'm having trouble with destroying an timer when the hero is revived
here the trigger

Trigger:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Countdown Timer - Start RevivalTimer as a One-shot timer that will expire in 45.00 seconds
Countdown Timer - Create a timer window for RevivalTimer with title Revival Time:
Countdown Timer - Show RevivalBox for Player 1 (Red)
Game - Display to Player Group - Player 1 (Red) for 10.00 seconds the text: Your hero will revi...
Wait 45.00 seconds
Hero - Instantly revive (Triggering unit) at (Center of Reviving Human <gen>), Show revival graphics
Camera - Pan camera for Player 1 (Red) to (Random point in Teleportation Human <gen>) over 1.00 seconds
Selection - Select (Triggering unit)
Countdown Timer - Destroy RevivalBox
Else - Actions

I just need to know how to destroy it if the hero is revived thorugh the tarvern

-Av3n
10-14-2006, 03:51 PM#2
Anopob
This might be a bad way to do it, but why wont you 1st set a variable to the hero. Then, I made this into 3 triggers:
Trigger:
Trigger 1
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Actions
Countdown Timer - Start RevivalTimer as a One-shot timer that will expire in 45.00 seconds
Countdown Timer - Create a timer window for RevivalTimer with title Revival Time:
Countdown Timer - Show RevivalBox for Player 1 (Red)
Game - Display to Player Group - Player 1 (Red) for 10.00 seconds the text: Your hero will revi...
Trigger - Turn on Trigger 3 <gen>

Trigger:
Trigger 2
Collapse Events
Time - RevivalTimer expires
Conditions
Collapse Actions
Hero - Instantly revive (unit variable to the hero) at (Center of Reviving Human <gen>), Show revival graphics
Camera - Pan camera for Player 1 (Red) to (Random point in Reviving Human <gen>) over 1.00 seconds
Selection - Select (unit variable to the hero)
Countdown Timer - Destroy RevivalBox
Trigger - Turn off Trigger 3 <gen>

Trigger:
Trigger 3 (initially off)
Collapse Events
Time - Every 0.10 seconds of game time
Collapse Conditions
((unit variable to the hero) is alive) Equal to True
Collapse Actions
Countdown Timer - Destroy RevivalBox
Trigger - Turn off Trigger 3 <gen>

Basically, it checks if the hero is alive, and if he is, it destroys the box...I think this will work....but since I haven't been map-making recently/not a good JASSer there might be an easier way to do this.
10-17-2006, 08:09 AM#3
Av3n
Thxs Anopob!

-Av3n