Voxel Game Maker

Docs Tutorials

Doors, keys and a second level

Lock a door behind a key, add a second level and an exit that takes the player there.

In the editor: Welcome ▸ Tutorials ▸ 1.5 ▸ ▶ Start goes on in your My Garden project with this lesson's checklist.

Build · about 30 minutes · Basic mode

What you'll make: a locked gate in your garden, a key to open it, and a second level behind it.

Before you start: do A coin hunt.

#1. A locked door

  1. Place the Locked gate model as a gate in the garden's fence (or across your path if you didn't build a fence).
  2. Select it with Select (1) and, in Properties, pick Door under What is it?.
  3. Set its Type to Locked door. Its Needs item says Key.

#2. The key

Place the Key model somewhere in the garden, make it a Pickup, and set its Type to Key.

Play it now: the gate stays shut until you pick up the key.

#3. A second level

  1. Choose Create ▸ New Level… (or right-click World 1 in the Explorer and choose + New level). It opens in its own tab.
  2. Build something small there: a cave, a beach, a tower top.
  3. Set its player start with the Start tool (6).

#4. An exit between them

  1. Back in the first level (click its tab), place something behind the gate, such as the Cave entrance or Stairs.
  2. Make it an Exit under What is it? and pick your second level in To level.

Play it now: go through the gate and the exit takes you to the new level.

#Try it yourself

  • Add an exit in the second level that goes back.
  • Join the two levels edge to edge instead: click a level in the Explorer, then use Joined levels in Properties, so walking off one side takes you into the other.

#Learn more

#Next

Your first model.