HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Whats wrong with my Timer Trigger?

07-23-2004, 03:20 PM#1
ImperialNaga
I want my timer to show only to the dying unit. And destroy when timer expires, but after the timer reaches 0, it wun destroy it! HELP!
NOTE: I got 10 players in map, and the below trigger only shows 1 player (player2) by the array of [1].

This is the setup timer trigger:
Code:
[b][u]Revive Setup[/u][/b][u][/u]
Events: A unit Dies
Condtions: -
Actions:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
~~Condtions:
Owner of Dying unit Equal to Player 2
Dying unit is a Hero Equal to True
~~Actions:
Set DeadPlayer[1]=Dying Unit
CountdownTimer - Pause Timer[1]
Set Timer[1]=Last started Timer
CountDownTimer - Create a TimerWindow for Timer[1] with the title Revive Time
Set Revive_TimerWindow[1]=Last created timer window
CountDownTimer - Show Revive_TimerWindow[1] for Owner of DeadPlayer[1]
CountDownTimer - Starts Timer[1] as a One-Short timer that will expire in 10 seconds

Now this is the revive trigger:
Code:
[b][u]Revive Player2[/u][/b]
Events: Timer[1] Expires
Condtions:
Actions: 
CountDownTimer - Destroy Revive_TimerWindow[1]
Wait 1sec
Hero - Instantly revive DeadPlayer[1] at x<gen>, Show revival Graphics

If anyone can correct me, i would be glad to hear frm it.
Hope someone help me!
Cos this is getting me annoyed ><"
07-23-2004, 04:13 PM#2
Jeltz
I'm not sure but you may have to hide the timer window before destroying it.
07-23-2004, 05:42 PM#3
ImperialNaga
Quote:
Originally Posted by Jeltz
I'm not sure but you may have to hide the timer window before destroying it.

That doesn't help much, and it didn't help...
Hide timer not working...
Any others can help me?
07-23-2004, 05:45 PM#4
johnfn
First of all, you can copy triggers by right clicking and pressing "copy to text".

Second of all, your triggers confuse me. Why do you do this:

Set Timer[1]=Last started Timer
CountDownTimer - Create a TimerWindow for Timer[1] with the title Revive Time
Set Revive_TimerWindow[1]=Last created timer window
CountDownTimer - Show Revive_TimerWindow[1] for Owner of DeadPlayer[1]
CountDownTimer - Starts Timer[1] as a One-Short timer that will expire in 10 seconds

It looks like your setting it to a timer that hasnt been started yet. First of all, its pretty redundant to set a variable to a countdown timer because it gets set anyways. (correct me if I'm wrong) Check out some code I have in my map:

Countdown Timer - Start tmrCountDown as a One-shot timer that will expire in 22.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Time until game

Thats all you need for a timer, except maybe to set it to a different timer (your timer)