Studio › Manual › 3D rooms

Pickups, keys and doors

Give things in a 3D room something to do when the player comes to them: coins and gems to collect, a key, a door that opens (locked until the player has its key), an exit that completes the room and a secret push wall. They work in Play Room (⌃R) and in GameMaker the same way, with the same numbers, with no code.

Select a model and pick its Type in the inspector's Behaviour section, or use Room > Game > Make Pickup (⌃⌥⇧G), Make Key (⌃⌥⇧U), Make Door (⌃⌥⇧D), Make Exit (⌃⌥⇧T) or Make Push Wall (⌃⌥5); No Behaviour (⌃⌥⇧0) takes it off. Right-click a model in the view for the same Behaviour ▸ menu. Each change is one undo step; copies keep it. The player can't have one (Make Player takes it off).

  • Pickup: spins and bobs; the player collects it by touching it: it pops away and its Kind (coin, gem, potion: any word, kept as gold_coin for "Gold Coin") counts up by its Value. Spin (degrees a second), Bob (metres), Reach (metres from the player's collision shape) and Effect (one of the project's effects, played where it was collected). It isn't solid (its group is pickup when it had none).
  • Key: a pickup that opens doors locked with its Key name (gold, silver, red…).
  • Door: opens when the player comes within its Reach. Opens: Swings round its hinge (Hinge side, Angle, Away from the player), Slides up or Slides sideways (Distance, 0: its own height or width). Time: seconds to open. Closes again: it shuts once the player is half a metre beyond its reach. Locked by: the key it needs; the key is used up unless Keep the key is on. Shut, it's solid; opening or open, it isn't.
  • Exit: reached by the player, the room is complete ("Room complete!"). Needs all: a kind to collect every one of first ("Collect all the coins first (3/10)").
  • Push wall: see Classic doors and push walls.

The section's foot says what the room has ("This room: 10 coins, 2 gems; keys: gold; 2 doors (1 locked: gold); 1 exit."). A thing on a path or attached to another doesn't do its behaviour (in Play and in GameMaker alike).

In Play pickups spin, bob and are collected, doors open and shut, keys are held; the counts show at the top left ("Coins 3/10 Gems 1/2 Keys: gold") and messages at the top. When Play stops everything is back where it was. The same walk played in Studio and in a GameMaker build gives the same counts, keys and doors on the same frames.

What's written: Room 3D's own creation code (behaviour, behaviour_reach, pickup_kind … pushwall_kind, in units and GameMaker's axes) after the thing's collision shape, roles and path settings, read by the kit's scr_r3d_pickup; and the collision shape Room 3D gives it (a box fitted when it had none; doors and push walls solid). See GameMaker pickup and door code.

Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.