Countdown example

Show us your completed creations made in Construct 2

Post » Wed Oct 09, 2013 10:08 pm



so this is what I have so far..but when it gets to -1 it goes to 0 and back and forth..so it keeps on hitting -1 and 0..-1 and zero...

not sure how to get it to stop at 0
http://i93.photobucket.com/albums/l74/spawn85027/timer_zpse14bf41a.jpg
snake850272013-10-09 22:14:13
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 7:25 am

Straight to the point! Thanks
B
27
S
5
G
2
Posts: 76
Reputation: 3,060

Post » Thu Oct 10, 2013 12:57 pm

Uh oh, this example is a bit outdated, considering it was made when dinosaurs still stomped their footprints in. ;)

@snake85027: it is still counting down, to make it stop, you need to add a condition to only count down while the number is above 0. Put TimerCountDown > 0 in the first event.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Feb 20, 2014 6:50 pm

Thanks I need a nice simple quick win, that was it
B
3
Posts: 3
Reputation: 205

Post » Sun Jul 27, 2014 7:49 pm

The function works well,but I wonder how to add leading zero when time reaches 9 seconds.
I need to display 0:09 instead of 0:9
B
14
S
3
G
3
Posts: 5
Reputation: 1,911

Post » Fri Nov 21, 2014 5:52 pm

Try zeropad:
https://www.scirra.com/manual/126/system-expressions
In your case, zeropad(9,2) will make it "09".
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Previous

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 3 guests