playMaker

Author Topic: Force timer to show "01" NOT "1" ? [SOLVED]  (Read 841 times)

daniellogin

  • Full Member
  • ***
  • Posts: 215
Force timer to show "01" NOT "1" ? [SOLVED]
« on: July 13, 2018, 06:36:15 AM »
I just made a system for a timer to count down from 2 minutes to 0. Basically it's a loop for one int to count down the 60 seconds and then reduce another int for the minutes until the timer reaches 0 minutes and 0 seconds. The idea is to then use these 2 ints converted as strings to change text to visualise the timer.

My problem is with the final string being displayed in the text. I want it to show two digits for the seconds, like this; "2:01", but when I'm just plain using the converted in it is displaying like; "2: 1".

What can be done to force the two digits displayed for numbers less than 10?

EDIT: Nevermind, I found it. You simply write d2 in the Format part of convert int to string action. Playmaker is awesome. It's not just the visual programming, but all the very handy shortcuts to functions.
« Last Edit: July 13, 2018, 06:42:47 AM by daniellogin »