Countdown timer: Creating one

Stats

6,536 visits, 9,494 views

Translations

This tutorial hasn't been translated.

Tools

Hey users! This is how to create countdown timers.

Creating User Interface

To start, add a "UI" layer. To make objects in this layer "float" set the properties scale rate and parallax to 0.

Adding a global variable

It is easy! Add a variable named Timer. Set value to any number (60 for me) and click the OK button.

Exception:Do not place 0.

Adding an object

To see the timer, add a text object and place it in the topmost layer.

Text must be set to Time.

Events: Adding event

To make it work, add en event.

Condition:

System>Every Tick

Actions:

System>Subtract from(Subtract dt from Timer)

Text>Set text(Set text to Timer)

Another condition:

System>Compare to variable(Timer=0)

Another action:

System>Restart layout

Testing

Run the game. Do you see it work?

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!