[SOLVED] Change timer display to "099" instead of "99"

Is there any way to utilize this with a timer? I already have a code for counting the displayed timer down by 1 every 0.4 (two-fifths of a second), thanks to @MrMen:

ToString(round(max(0, 400 - (TimerElapsedTime("TIME_COUNT")* 2.5))))

but I need to be able to display it so that 99 seconds shows as “099” and 9 seconds shows as “009” without messing up the countdown code.

I’m very much not a coder, nor do I know the first thing about string manipulations so any and all help would be greatly appreciated.

Assign that code I gave to scene text variable called countdownText.

Then set the text object (I’ve called mine CountDownTimer, and it’s the one that displays the countdown time on screen) to StrRepeat("0",(3 - StrLength(VariableString(CountDownTimer)))) + VariableString(CountDownTimer)

Using the method you’ve quoted, it looks like:

1 Like

Holy moly, it worked! Thank you so, SO much! :smile: