PDA

View Full Version : How to reset timer?



Pawnbroker
May 29th, 2010, 16:37
I need to know how to switch timer back to 0, so that hero spawn trigger will do it's job over and over again every time it is triggered.. now, it only works once, then stops because the timer continues going :mad:

Duke Ragereaver
May 29th, 2010, 16:45
Hello, welcome to KK!

To answer your question:

Set a timer and set the repeat to infinite or if you want it to stop otherwise then set a number.

Then do a trigger, set it to infinite. and say When Flag=0.
Then do another trigger on that trigger which is When Timer1>=Whatever value and infinite it.
Then do an action which adds a hero party at the action point over the hero gate. Do another action which is the Set Timer.

Now this will infinitely loop parties to come when say 7 minutes have passed. However, this is as long as Flag 1 = 0. That is the default value for all flags, 0. Then when a player claims the land around the gate the gate is destroyed or appears to be and Flag 1 shifts to 1. Assuming you are using a 2x2 Hero Gate.

With Flag 1 != 0, the cycle is broken and no more heroes shall enter (this works for both Hero Gate types).

Simply go to Timer as you would Flag in sections from a trigger, and then choose which timer. You can reset timers again with these.

If you are confused, you may want to look at the manual or look at a level where this is already done.

Pawnbroker
May 30th, 2010, 09:57
Ok :D

darkkingkongman
March 15th, 2013, 16:56
The skirmish map 'Onslaught' has an infinite hero party invasion set up to invade the keepers on the map. Might be a good idea to open this map up in the editor and copy the triggers from this map to your own to set up your infinite hero invasion. Worked for me.