# How do I do a countdown timer.

Get help using Construct 2

### » Fri Jul 04, 2014 1:42 pm

I saw a few examples like this one, however I need like two sets of countdown timers. do that displays hour, mins, seconds and another that displays minutes, seconds milliseconds I need them to display in two digit format like XX:XX:XX.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

### » Fri Jul 04, 2014 6:22 pm

B
60
S
10
G
10
Posts: 1,013
Reputation: 9,165

### » Fri Jul 04, 2014 7:55 pm

You could also try this small example:
https://dl.dropboxusercontent.com/u/413 ... conds.capx
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

### » Sat Jul 05, 2014 2:16 am

Thanks for the help! Just need to figure out milliseconds and I'd be solid!
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

### » Sun Oct 26, 2014 2:37 pm

Did you figure out how to do milliseconds?
B
20
S
6
G
2
Posts: 157
Reputation: 3,116

### » Sun Oct 26, 2014 3:02 pm

@silkc2 - Here's an example with milliseconds(and hundredths of a second). This example works differently from Ugotsta's, but I've tried to comment it well to illustrate what's going on.

countdown.capx
You do not have the required permissions to view the files attached to this post.
Moderator
B
114
S
41
G
20
Posts: 1,586
Reputation: 19,161

### » Sun Oct 26, 2014 3:19 pm

Thanks for that.. the thing is I wanted to make it simpler so I'm using dt assigned per tick to a var called Seconds - I'm so close:

round(Seconds*10)/10

Gives 1.2, 1.2, 1.3 etc (I don't care about third digit so much)
But it breaks for whole numbers ; I want it to show 2.0 and instead it shows 2, which is really messy on a timer.
B
20
S
6
G
2
Posts: 157
Reputation: 3,116

### » Sun Oct 26, 2014 3:27 pm

Ah, solved..

If you prefer 1.11 format:

B
20
S
6
G
2
Posts: 157
Reputation: 3,116

### » Tue Dec 30, 2014 7:05 am

silkc2 wrote:Ah, solved..

If you prefer 1.11 format:

This is pretty cool, but how can I get it to display minutes when 60 seconds has passed?
B
14
S
3
Posts: 123
Reputation: 1,571