How do I create a countdown?

Get help using Construct 2

Post » Sat Jun 06, 2015 2:05 am

How can i do a countdown that will start my layout?
B
3
Posts: 8
Reputation: 191

Post » Sat Jun 06, 2015 7:09 am

Create a variable with the amount of time you want it to last.
Create a function that every tick will subtract a value from this variable.

I suggest you to subtract to this variable the value of " 1*dt "
dt means Delta Time and it will make the game subtract 1 every second independent of the player's computer frame rate.

Now create a condition that when the variable value hits 0 will call the function "go to layout" if you want to change layouts, "set group active" if you want an specifically part of your code to be executed, or whatever other event that you want to happen as soon as the count down reaches 0.

If you want the count down to appear on the screen use a text object and set to every tick to chance it text to the value f the variable.

:)
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Sat Jun 06, 2015 2:42 pm

Try this tutorial link below. Many tutorials here for you to learn

https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0
B
250
S
39
G
15
Posts: 1,953
Reputation: 40,623


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish and 17 guests

cron