- Joined
- May 6, 2005
- Messages
- 15
I have tried everything, but this just refuses to work. This trigger would be for an RPG map with multiple players.
I'm trying to set triggers to start a timer when a player's hero dies, and display that timer. My problem, though, is removing the timer when it expires. I can't just use destroy - last created timer window, because the last created timer window may not be the timer that is expiring. Here's roughly how I want this trigger to work, but I can't get the triggers to behave.
Event:
A unit dies
Conditions:
(((Triggering Unit) belongs to an ally of Player 2(blue)) Equal to True) and (((Triggering Unit) is A Hero) Equal to True)
Actions:
Start playerrevive[player number of (owner of(triggering unit))] as a one-shot timer that expires in 60 seconds
Create timer window for playerrevive[player number of (owner of(triggering unit))]
Wait 60 seconds
Instantly revive (triggering unit) at center of (location), hide revival graphics
Destroy timer window for playerrevive[player number of(owner of(triggering unit))]
The last part, in bold, is what I'm having a problem with. Up until this point, the shown variable options have been Timers and Timer Arrays. However, the DESTROY timer window only shows variables for Timer Windows and Timer Window Arrays. And I can't use (Last created timer) because the last created timer MAY NOT be the right timer. Does anyone know how to set a Timer Window to a Timer variable?
Edit: I realize the event and condition don't work. I just typed them in like that to give you an idea of what's triggering this trigger. I will fix them after I figure out how to get this to work.
Edit: Got bored and fixed the event and condition.
I'm trying to set triggers to start a timer when a player's hero dies, and display that timer. My problem, though, is removing the timer when it expires. I can't just use destroy - last created timer window, because the last created timer window may not be the timer that is expiring. Here's roughly how I want this trigger to work, but I can't get the triggers to behave.
Event:
A unit dies
Conditions:
(((Triggering Unit) belongs to an ally of Player 2(blue)) Equal to True) and (((Triggering Unit) is A Hero) Equal to True)
Actions:
Start playerrevive[player number of (owner of(triggering unit))] as a one-shot timer that expires in 60 seconds
Create timer window for playerrevive[player number of (owner of(triggering unit))]
Wait 60 seconds
Instantly revive (triggering unit) at center of (location), hide revival graphics
Destroy timer window for playerrevive[player number of(owner of(triggering unit))]
The last part, in bold, is what I'm having a problem with. Up until this point, the shown variable options have been Timers and Timer Arrays. However, the DESTROY timer window only shows variables for Timer Windows and Timer Window Arrays. And I can't use (Last created timer) because the last created timer MAY NOT be the right timer. Does anyone know how to set a Timer Window to a Timer variable?
Edit: I realize the event and condition don't work. I just typed them in like that to give you an idea of what's triggering this trigger. I will fix them after I figure out how to get this to work.
Edit: Got bored and fixed the event and condition.