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?
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.

Posts: 280
Reputation: 2,522

Post » Sat Jun 06, 2015 2:42 pm

Try this tutorial link below. Many tutorials here for you to learn ... 7YPza?dl=0
Posts: 1,983
Reputation: 41,036

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests