Getting Started
2 of 11

This tutorial explains how to add a timer to your game.

Click to watch the tutorial

Setup your project

For this tutorial, we'll start with a sprite following the mouse, and coins moving to random locations after colliding with the sprite. A picture of the blocks is below.

Add a label to the stage

Start the timer when the game starts

From the timer drawer, get the "start timer" block and drag it under the "when game starts" block.

Set label text

Now we'll want the label to show the timer's time. Drag the set label text block inside of the forever loop.

Display timer's time

Replace the "hello" block with the "timer's time" block from the timer drawer.

Click the play button

The timer should count up, but it stops at 5, and it has many numbers after the decimal. We'll fix both issues.