Count Up Timer Code Question
wayback_gamer
USMember, PRO Posts: 124
How can I display the minutes I am counting and separate them with a colon with this timer? Please see attached image for current code that displays seconds and resets to 0 every 60 seconds and adds 1 to a counter variable which will be the minutes. I want to display the minutes text and separate them with a colon from the seconds.
Best Answer
-
zweg25 Posts: 738
@PureEpicStudios if you are using display text, just use the "padInt" function. You would display text padInt(game.minutes,2)..":"..padInt(game.seconds,2).
This means no matter what the number is it will always display at least two digits
Answers
Here's a demo file that I whipped up. Is this what you mean?
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio
Thanks for replying and your example is close to what I want. I don't suppose it would be very thorough to add some rules and include a "0" for the first nine seconds?
It only clutters it a little. Here you go
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio
@zweg25 sweet! Good to know.
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio