Skip to lesson
LESSON 27 / 44 · Intermediate

Spikes and reusable contact damage

Make a hazard hurt the player using the existing combat tools.

Open editor in a new tab ↗

Before you begin

Place a spike or other hazard object on a safe test floor.

Build it step by step

  1. Open Rules → Combat & interactions and choose Contact damage.

  2. Choose the hazard as the source and the player as a target. Create or reuse the player’s Health property.

  3. Set damage and protection after hit. Choose a defeat behaviour deliberately; avoid adding a second game-over rule if the preset already handles it.

  4. Apply the preset and inspect the generated ordinary rules. Their object references explain which hazard affects which target.

  5. Test touching, remaining in contact, moving away and returning. Add a safe route so the hazard is avoidable.

TRY THIS IDEA

Practical example

A spike can remove one health point per permitted hit without instantly draining the entire health bar.

Test your work

Protection spaces out accepted hits, and the player has a chance to leave the hazard.

If it does not work

If a hazard restarts the whole game unexpectedly, look for older starter enemy/contact Restart rules.

MAKE IT YOUR OWN

Student challenge

Build a hazard corridor with a clear safe waiting area and enough room to jump.

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

Keep exploring