• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Timer pause/resume

Status
Not open for further replies.
Level 2
Joined
Nov 3, 2016
Messages
7
I am still fairly new to the world editor. what i am working on is wave based. I am trying to make a repeatable timer and when it expires it will pause and then resume when all enemy's are dead. Then it will repeat that till i turn it off. This is what i have so far...

1.png
2.png
3.png


Now my problem is The timer is created and runs how it suppose to, but it will not resume. The timer stays pause. I know "enemycounterRed" is not the problem because i have it displayed on a multi-board in game so i know when it reaches 0. Any way to help me?
 
Last edited:
Level 12
Joined
Jan 2, 2016
Messages
973
Why do you do this with "Repeating timer", when you pause it upon expiration anyways? Just make it a 1 shot timer.
Also having the same condition 2-ce in a row in the trigger is quite pointless. You can remove the "if" inside the function.
And for the reason why it is not working:
Add a "Set enemycounterRed = (enemycounterRed - 1)" before the "if" check.
Also remove the "Do nothing" as it's beyond useless.
 
Level 2
Joined
Nov 3, 2016
Messages
7
Why do you do this with "Repeating timer", when you pause it upon expiration anyways? Just make it a 1 shot timer.
Also having the same condition 2-ce in a row in the trigger is quite pointless. You can remove the "if" inside the function.
And for the reason why it is not working:
Add a "Set enemycounterRed = (enemycounterRed - 1)" before the "if" check.
Also remove the "Do nothing" as it's beyond useless.

I did test it your fix did work. Why do i have to add "Set enemycounterRed = (enemycounterRed - 1)"in my 002 trigger. i already have that done in another trigger.
 
Level 25
Joined
May 11, 2007
Messages
4,651
" Why do i have to add "Set enemycounterRed = (enemycounterRed - 1)"in my 002 trigger. i already have that done in another trigger."

We only know what you post. If you have triggers that affect the triggers you posted but doesn't show them, it's kinda hard knowing that you have triggers that affect the triggers you've posted.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
Resuming a paused periodic timer results in it turning into one-shot. Same applies if a periodic timer is loaded from a save game. It is a WC3 bug, pause/resume timer does not conserve the periodic state of the timer.

The work around it is constantly restart the timer as one-shot in response to it expiring.
 
Status
Not open for further replies.
Top