How do I make a timer for stats?

Noroup

  • Posts: 134
I would like to display hours, minutes, and seconds played.

I have an idea, I would input "Add 1 to seconds every second" and "Divide seconds/60 then set equal to minutes"

However, I always get a decimal. I want a whole number so I could set the remainder equal to the preceding value.
 
For instance, 620/60= 10 minutes
620-(10x6)= 20 seconds

Stats would show 10 minutes and 20 seconds

rob1221

  • *
  • Posts: 9459
I have an extension that converts a number to time formats, although you could do something similar in design mode too.
http://community.stencyl.com/index.php/topic,15691.0.html

Noroup

  • Posts: 134
I have an extension that converts a number to time formats, although you could do something similar in design mode too.
http://community.stencyl.com/index.php/topic,15691.0.html
I'll check it out thank you so much! Does it still work with stencyl's current version? It basically converts a value into hours, minutes, and seconds right?

rob1221

  • *
  • Posts: 9459
Quote
Does it still work with stencyl's current version?
I haven't tested but I don't expect there to be any issues since it's just some math.

Quote
It basically converts a value into hours, minutes, and seconds right?
There are 5 formats, with that being one of them.

Noroup

  • Posts: 134
Quote
Does it still work with stencyl's current version?
I haven't tested but I don't expect there to be any issues since it's just some math.

Quote
It basically converts a value into hours, minutes, and seconds right?
There are 5 formats, with that being one of them.
I'll check it out as soon as I get home, thanks.

Do you have skype? Discord? Kik?

rob1221

  • *
  • Posts: 9459
Yeah but I prefer to keep the Stencyl talk on the forums.  I don't do live tutoring.

Noroup

  • Posts: 134
Yeah but I prefer to keep the Stencyl talk on the forums.  I don't do live tutoring.
Hi Rob, I installed the extension, thank you very much.

But how do I use it? It's just a blank block that doesn't attach to anything.

Here's my goal: Every 1 second, a time value would be increased by one. Then it would be divided by 60 and shown in terms of hours, minutes, and seconds played on a stats page. How would I accomplish this?

LIBERADO

  • *
  • Posts: 2660
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Noroup

  • Posts: 134

Thank you my good sir! You never fail to impress