Docs Tutorials
Enemies and health
Choose how the player fights, place enemies, and add hearts, boulders and chests that keep the player going.
In the editor: Welcome ▸ Tutorials ▸ 2.5 ▸ ▶ Start goes on in your My Playground project with this lesson's checklist.
Build · about 30 minutes · Basic mode
What you'll make: a small cave with enemies to fight, a boulder to smash, a chest of loot and a door that opens when the last guard falls.
What you'll learn: combat, health, and items that drop.
Before you start: do A talking character.
#1. Choose how the player fights
- Open Game Settings.
- In the Combat group, set Combat style to Light action: left click swings, Ctrl rolls out of the way.
Classic is the other common choice: left click shoots a bolt that costs mana, V swings.
#2. An enemy
- Place the Slime. In Properties, under What is it?, pick Enemy and set its Type to Chaser.
- Set its Health and Speed.
- Under Moves, pick a Preset for how it attacks.
Play it now: walk near it. It comes after you. Hit it until it's defeated. A Chaser drops two coins.
#3. One that keeps its distance
Place the Turret and make it an Enemy with the Type Shooter. Set its Damage and Range (tiles). Put it on a ledge where it's hard to reach.
Play it now: dodge its shots on the way up.
#4. Getting health back
- Place the Heart. Make it a Pickup with the Type Heart and set Restores health.
- Place a Checkpoint at the cave mouth and tick Refill health.
Play it now: get hurt, then touch the heart. The health bar fills up.
#5. A boulder and a chest
- Place the Boulder. Make it Breakable, set Health, and type
Heart = 1in Drops. - Place the Chest. Make it a Chest and type
Coin = 5in Gives.
Play it now: smash the boulder, and press E on the chest.
#6. A door for the last guard
- Pick the toughest enemy. In Properties ▸ Rules, click + Add a rule and set When to it's destroyed.
- In Do, pick Set switch, with Switch
guard_beatenand To On. - Place the Locked gate deeper in the cave. Make it a Door with the Type Opens with a switch, and type
guard_beatenin its Switch.
Play it now: defeat the guard. The door opens.
#Try it yourself
- Turn the guard into a boss: under Moves, click Make it a boss.
- Hide a boulder that drops a key for a locked chest.
- Switch the Combat style to Classic and play the cave again. Which feels better for your game?
#Learn more
- Game settings ▸ Combat.
- Cookbook: Enemy that chases, Health pickup, Breakable crate, Chest with loot, Boss with phases.
#Next
Get an email when Voxel Game Maker launches
It's coming to Steam with a launch discount. One email on launch day, the odd progress update, nothing else.