How to create a killing object?
Want to spice up your game? Create a killing object to make your game more interesting.
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.
Select your object
Set your Trigger
Drag the “Player Touches Object” trigger block into the Behavior Editor.
Add Game Action
In “Game Actions”, drag the “Kill Player” action block and place it below the trigger.
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.
Select your object
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.
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.
Playtest!
After setting up the movements, test your game to see how the object behaves and make adjustments for the perfect effect.
Was this page helpful?