| 03-09-2004, 12:34 PM | #1 |
I've tried, god knows I've tried, but if two people have got timers running (hero restoration countdowns), only 1 gets cleared, and eventualy the top of the screen gets filled with blank timers... Obviously something is stopping them form clearing when more than 1 is present, but I've set each trigger to specify each player's timer and window with array variables. The restoration works. The hero timer appears, deisplays the correct time, sounts down and restores the hero. But... as I said if there's multiple timer windows, they dont disapear. Code:
Then - Actions
Set restorecount[(Player number of (Owner of (Dying unit)))] = (restorecount[(Player number of (Owner of (Dying unit)))] + (Hero level of (Dying unit)))
Countdown Timer - Start Timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (Real(restorecount[(Player number of (Owner of (Dying unit)))])) seconds
Countdown Timer - Create a timer window for Timer[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
Wait (Real(restorecount[(Player number of (Owner of (Dying unit)))])) seconds
Countdown Timer - Destroy TimerWindow[(Player number of (Owner of (Dying unit)))]
Camera - Apply North Spawn <gen> for (Owner of (Triggering unit)) over 0.00 seconds
Hero - Instantly revive (Dying unit) at (Center of HQ North <gen>), Show revival graphics |
| 03-09-2004, 01:46 PM | #2 | |
I'm getting so tired of saying this... Quote:
Also, why would you even use a wait statement when you can detect the destruction of the timer? If you still need help, I'll post the code later. |
| 03-09-2004, 02:21 PM | #3 |
You can split it up in two triggers and delete the wait. On the second trigger just add the event: a timer expires. |
| 03-09-2004, 03:11 PM | #4 |
Aye, I figured it out.. Code:
Kill Timer
Events
Unit - A unit Begins reviving
Conditions
Actions
Set TimerWindow[(Player number of (Triggering player))] = (Last created timer window)
Countdown Timer - Destroy (Last created timer window) |
