Skip to lesson
LESSON 32 / 44 · Beginner

Win, game over and restart rules

Create clear endings and predictable recovery.

Open editor in a new tab ↗

Before you begin

Have a finish flag and a player with a Health property.

Build it step by step

  1. Add an IF Objects touch rule for player and finish flag. Use GAME → Win the game.

  2. Add an IF Object property condition for Health at most 0. Use GAME → Game over unless a preset already owns that outcome.

  3. Test winning and losing separately. Both should stop active gameplay and present the corresponding result.

  4. Use Restart to begin again. Confirm initial objects, score and properties return according to the game’s restart behaviour.

  5. For an adventure checkpoint instead of immediate loss, inspect the checkpoint tools and progress policy before choosing Return to checkpoint.

TRY THIS IDEA

Practical example

A short coin course wins at its flag and loses after three accepted hits. Both outcomes can be tested in under a minute.

Test your work

You can reach both endings and restart without an old projectile, score or animation state leaking into the new run.

If it does not work

If reaching a flag travels to another level, inspect Scene settings → Level exit. Avoid conflicting Win and Change level actions on the same contact.

MAKE IT YOUR OWN

Student challenge

Add a score requirement before the finish flag can win.

Show the result to a partner. Explain what you changed and how you tested it.

Keep exploring