Is there a simple way to pause a timer? If I use stop timer, is there any way to start it again, where it left off, or do I have to check the timer, then stop it, and then then set the timer again using the timer given by checking the timer? That seems overly complicated and I don't know if I want to try doing it before asking to make sure there isn't a simpler way of doing it.
EDIT: I'm asking because I'm adding a powerup in Crusty's Heyday which stops the clock, giving you more time (the game actually ends now, yay!).
Pause Timer?
Moderators: marionline, SDHawk
Pause Timer?
Last edited by kylekrack on Sun Apr 05, 2015 7:55 am, edited 1 time in total.
My pronouns are they/them
Ps. I love my wife
Ps. I love my wife
I think you're on the right track with the "Start the timer with the old timer thing" like uhh
wouldn't be too weird?
Code: Select all
stoptimer
SetTimer (1,ReadTimer (1),Whatever,Whatever,Whatever,etc)
"stop timer" actually pauses a timer, by setting its speed to zero. All you have to do to resume it is use "set timer" to set its speed back to the correct value. All arguments to settimer except for the timer ID are optional, and if you leave them out or write timer:default, then the value remains unchanged.
Also, if you only have one timer, then you can use the "suspend timers" command, which pauses all of them.
Code: Select all
stop timer (5)
...
set timer (5, timer:default, 18) # 18 ticks per timer tick
Ah, ok, that makes more sense. The method I used is a bit more convoluted, but really not enough to go back and change it. I just passed the count argument for what the timer returned as it stopped, and that seems to work fine. Good to know that though, timers are very important to the process of this game. In this case, suspending them would not be the best, given I just hit 12 total yesterday. There's a lot of timers goin' on left and right in this game.
My pronouns are they/them
Ps. I love my wife
Ps. I love my wife