Displaying time

3absh3absh Member Posts: 601

display text

minutes
mod(floor(( game.Time )/60),60)

hours
floor(( game.Time )/3600)

problem is time is displayed

1:0

intead of

01:00

how do i display the zero on the left without having to use an additional display behaviour?

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    padInt(x,2)

    padInt(5,2) = 05

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @abuabed84

    use padInt(value, number of characters)

    so padint(value,2) will return your above example as 01

    Do the same for the minutes.

Sign In or Register to comment.