HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Expiring Timer help

05-01-2004, 07:20 PM#1
ElvenCommander
I have expiration timers for revivals, but I don't want to have 239026 triggers for them.

The timers "start" is easy to do (dying unit equal to blah, start blah timer)

But the thing is the "expire trigger", I can put "timer 1 expires","timer 2 expires", ... events
but there is no condition regarding "expiring timer"

Basically what I would need is a JASS command for the Expiring Timer condition, which would be kinda like a "Triggering Unit"
05-01-2004, 07:26 PM#2
SoulReaver
Im not sure what you mean, dude. HOwever you can make a varible and say ((set "timer" = last expired timer)) or why dont just use the same time, use ((create a repeatin timer))
05-01-2004, 07:57 PM#3
ThyFlame
What are you reviving?
05-01-2004, 08:01 PM#4
SoulReaver
a hero i guess ;)
05-01-2004, 08:43 PM#5
ElvenCommander
Quote:
Originally Posted by SoulReaver
Im not sure what you mean, dude. HOwever you can make a varible and say ((set "timer" = last expired timer)) or why dont just use the same time, use ((create a repeatin timer))

Thats my point, there are no "Last expired timer", thats what I'm looking for

This is for a hero reviving trigger
05-01-2004, 11:14 PM#6
qwertyui
The death / revival trigger can be done as follows (written in pseudocode :P):

Event: Unit that needs to be revived later dies.
Conditions: Whatever conditions you need
Actions:

[First set of actions]
Do everything you need to do after the unit dies. Dying penalties, dead timer displays, whatever. Don't forget to calculate respawn time ^^

[Second set of actions IN THE SAME TRIGGER]
Contains exactly one action:
Wait for <respawn time> seconds

[Third set of actions IN THE SAME TRIGGER]
Revive triggerring unit
and do whatever you need to do upon this unit's revival.

After you have it, it will work like this:

Every time a unit that needs to be revived later dies, this trigger will be fired.

The trigger will store the dead unit as its own triggerring unit and will proceed to execute all the commands. When he calculates the waiting time in first set of actions, it will wait for that time during the second set of actions and then revive the triggerring unit during third set of actions.

If any reviveable unit dies while the first unit is still in revivetime, he will have his own instance of this trigger fired up for him, with his own procedures and waiting time.

If you have not too many units with respawn timers, this trigger should do all the work for you.