toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
how do i display 120 seconds like 2:00 minutes
guilleface
Member
Posts:
1,014
August 2012
edited August 2012
in
Working with GS (Mac)
hi need my timer to count like this 2:00,1:59,1:58 etc instead of 120,119,118, thanks
Comments
hotMagic
Member, PRO
Posts:
266
August 2012
You can get the minutes by doing 120/60, so you get 2, and leave off the fractions, all you need is the whole.
Get the seconds by doing mod which is %,
So for example, if you have 118 seconds, 118%60 is 58.
If you have 189 seconds, your seconds are 9.
So display them as two variables, minutes and seconds, and calculate that way.
guilleface
Member
Posts:
1,014
August 2012
thanks i will try this.
Zoyt
Member
Posts:
374
August 2012
I worked for about 2 hours on making this for my own game and I succeded. I already have the template made. When I fix my website server, ill upload it for you.
Sign In
or
Register
to comment.
Comments
Get the seconds by doing mod which is %,
So for example, if you have 118 seconds, 118%60 is 58.
If you have 189 seconds, your seconds are 9.
So display them as two variables, minutes and seconds, and calculate that way.