Issue with Countdown Timer
I implemented the countdown timer from the example on Tshirtbooth's site (gshelper.com) but I'm having an issue. When the "Pause" function is run, the timer still counts down.
I tried creating a variable "IsPaused" that can be true/false. When Pause is run, I set it to true. I added a Rule to only run the timer if the function is set to False... unfortunately this had the effect of just restarting the timer from the top value when I unpause.
I'm sure there is a simple solution, but I can't seem to find it.
I tried creating a variable "IsPaused" that can be true/false. When Pause is run, I set it to true. I added a Rule to only run the timer if the function is set to False... unfortunately this had the effect of just restarting the timer from the top value when I unpause.
I'm sure there is a simple solution, but I can't seem to find it.
Best Answer
-
tenrdrmer Posts: 9,934
I would have my timer attribute setup and then a rule
When IsPaused is false
-every 0.1 seconds change attribute timer to (time - 0.1)
Also make sure you are not checking run to completion as it may not stop even once the rule becomes invalid.
Answers