How do I create a countdown timer with minutes and seconds

Get help using Construct 2

Post » Tue Jun 03, 2014 9:28 pm

Hello!

I've checked some countdown timer topics here on the forums but most of them work only with seconds. I would like to create a 10-minute countdown timer on the screen that shows both minutes and seconds, but I really don't know how, besides using a global variable and adding 1 second at a time.

Any help would be greatly appreciated.
B
4
Posts: 17
Reputation: 234

Post » Tue Jun 03, 2014 9:35 pm

That's pretty much it. Use the Timer behaviour to count seconds. Start your counter at 600, subtract 1 every second, display int(Counter/60) & ":" & zeropad(Counter%60, 2)
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Tue Jun 03, 2014 9:43 pm

Time is easier to handle in seconds.
Here is one of the better example capx found in forums.

24 hours is 86400 sec
10 min is 600 sec

edit: ninja'd lol
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Jun 03, 2014 9:55 pm

:D By 480 seconds!
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Wed Jun 04, 2014 6:38 am

blackhornet wrote::D By 480 seconds!


Yip - 8min delay - strange hey? It also didn't give me warning that someone had responded. I did take awhile to submit as I actually forgot to hit the button :oops:
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Wed Jun 04, 2014 11:00 am

Thank you! It's working perfectly.
B
4
Posts: 17
Reputation: 234


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests