• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Creating a Repeating Timer

Status
Not open for further replies.
Level 11
Joined
Feb 2, 2011
Messages
342
I was wondering what the triggers for a repeating timer would look like.

I want to create a repeating timer that adds a value equal to the total number of Outposts(a custom unit of mine) owned by a player multiplied by 500 to both each players gold and lumber.

I got everything to work up to the resources being collected when the timer expires.

Hopefully you guys can help! Thanks!
 
Level 12
Joined
May 22, 2015
Messages
1,051
What do you need to do? Do you mean you just need to make the timer restart? You should be able to just switch one option in the action that starts the timer. It should look something like:
"Start timerVariable as a one-shot timer that expires in 5 seconds"

Switch one-shot to repeating.
 
Level 11
Joined
Feb 2, 2011
Messages
342
For the first trigger I initialized my timer and timer window variables, created the window, started the repeating timer, and showed the window to all player.

For the second trigger I added and player group action that increased the gold and lumber of each player for the amount of Outposts they controlled when the repeating timer expired.

Maybe I have to use an array in my action, for the timer expires event, but I am not sure how to do that.
 
Level 12
Joined
May 22, 2015
Messages
1,051
For the first trigger I initialized my timer and timer window variables, created the window, started the repeating timer, and showed the window to all player.

For the second trigger I added and player group action that increased the gold and lumber of each player for the amount of Outposts they controlled when the repeating timer expired.

Maybe I have to use an array in my action, for the timer expires event, but I am not sure how to do that.

I'm confused what your problem is. Your description makes it sound like it should work. Can you post your triggers? And can you describe what you want to happen and what part is not working?
 
Level 11
Joined
Feb 2, 2011
Messages
342
bandicam%202015-09-18%2016-46-24-138.jpg


bandicam%202015-09-18%2016-46-26-575.jpg
 
Status
Not open for further replies.
Top