Countdown timer pause
Belwas
Member Posts: 22
Hi all,
I've followed tshirtbooths tutorial on how to make a countdown timer using the in game clock, as I need the time accurate to 3 decimal places. I've had a look but can't find a way to pause and unpause this timer though?
Something like this maybe? When pause is pressed, attribute = 'mytimer' and then adding a simple timer 'every 0.001 seconds -0.001'?
Comments
You're on the right track. The built-in time functions (e.g. game.Time, self.Time) cannot be paused or manipulated. But you can use a Timer behavior to increase or decrease the value of a custom real attribute (game.timeLeft) and then have that Timer inside of a rule that has a condition that can be switched from true to false to pause the timer.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Maybe this free template will help?
http://www.deepblueapps.com/free-timer/
Darren.
I think I saw that on your site before but it's Mac only and I'm on PC