How do I place a ":" into a global variable?

Get help using Construct 2

Post » Wed Aug 13, 2014 3:20 pm

I making a timer and I want to place a : between the digits to seperate minutes from second. If the global variable is 300 how could I make it appear as 5:00, 4:59, 4:58...?
B
37
S
14
G
3
Posts: 263
Reputation: 4,280

Post » Wed Aug 13, 2014 3:24 pm

If your global variable name is Timing (in seconds)

Use floor(Timing/60)&":"&zeropad(Timing%60, 2) to display it in a minute:seconds format

I did not test it out but it should work
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Wed Aug 13, 2014 3:55 pm

Wow! Thanks @Aphrodite Works perfectly :)
B
37
S
14
G
3
Posts: 263
Reputation: 4,280


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests