In your game, you can create a killing objects in various ways, but here are two different methods!

Option 1: Instant death

The player instantly dies upon collision with the object.

1

Select your object

2

Set your Trigger

Drag the “Player Touches Object” trigger block into the Behavior Editor.

3

Add Game Action

In “Game Actions”, drag the “Kill Player” action block and place it below the trigger.

4

Playtest!

After setting up the movements, test your game to see how the object behaves and make adjustments for the perfect effect.

Option 2: Player Loses a Life on Collision

The player instantly dies upon collision with the object.

1

Select your object

2

Set your Lives

Drag the “Game Starts” trigger block into the Behavior Editor. Then go into “Game Actions” and drag the “Set Maximum Lives” block below the trigger. Modify the number of lives (default is 10) by toggling the block.

3

Add Killing Logic

Let’s create the killing action. Drag the trigger block “Player touches Object”. In “Game Actions”, find the block “Add Lives” and tap to toggle the rest of the behavior. Change the value to -1. Every time the player collides, they will lose one life.

4

Playtest!

After setting up the movements, test your game to see how the object behaves and make adjustments for the perfect effect.