A countdown timer

By the end you will have a clock that counts down from sixty seconds, and a game over when it reaches zero.

What you need

Everything here is in Simple mode.

Timer display+ Add object โ†’ New โ†’ Timer display. Set Counts to Down to zero, Starts at (seconds) to 60, Label in front to Time: .
A heroAny player sprite, like Hero from the library.
CoinsCoin from the library. Use Make gridโ€ฆ to spread a row of them.
Game over textA Text saying Time's up! with Visible when the level starts unticked.
Sound+ Built-in sound โ†’ Game over and Coin.
NutHouse
The Timer display settings: Counts, Starts at and Label in front

Build it

  1. Add the Timer display and put it in a corner. Name it Clock.
  2. Open the Events tab. Click + New event, click Clock, then Time runs out.
  3. In the Time's up! cell choose Show. In the Hero's cell choose Stop. In โ™ช Sound choose Play a sound โ†’ Game over.
  4. Click + New event. Click the Hero, then Collides with another object โ†’ Coin.
  5. In the Coin's cell choose Destroy. In โ˜บ Player 1 choose Add to score, 10. Play Coin.
  6. Press โ–ถ Play level. Watch the clock. Collect as much as you can before zero.
WhenClock: Time runs out
DoShow Time's up!Stop HeroPlay sound Game over
WhenHero collides with Coin
DoDestroy CoinAdd 10 to scorePlay sound Coin

Time runs out is red. It happens once, the moment the clock hits zero. That is why the sound plays only once.

Make it yours

  • Bonus time: in the coin rule, add Add time to the Clock, 5 seconds. Now coins buy you more time.
  • Hurry-up warning: Compare seconds shown, โ‰ค at most 10 โ†’ Flash (blink) the Clock (Advanced).
  • Freeze the clock on a pause screen with Pause the clock and Start the clock again (Advanced).

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.