Door
Takes whoever uses it somewhere else, with no code: a level’s exit to the next Scene, or a door or teleporter to the Target entity in this one. It’s used on touch, or with the Interact action while touching it when NeedsInteract is on. Needs a collider, usually a trigger. Going to another scene, the players arrive at the entity its ArriveAt names there (the door back), so doors join rooms both ways.
Requires: Collider (usually a trigger)
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
scene: text = null. The scene to go to, e.g. “Level2”. Empty stays in this scene and goes to Target. (Names a scene.) (Field: a name.)arriveAt: text = null. Where whoever goes through arrives in the Scene: the name of an entity there, e.g. “West Door” (the door back, which they don’t go straight back through), standing where it is; the players’ other characters arrive there too. Empty starts them where the scene has them. (Only used when scene is set.) (Names something in the scene scene names (a hotspot there, or any entity): the Inspector lists that scene’s to pick from, and flags a name it doesn’t have.) (Field: its own editor: In Scene.)target: text = null. The name of an entity in this scene to go to, e.g. “CaveExit”, when there’s no Scene. (Names an entity.) (Field: an entity’s name.)fade: a number = 0.3. Seconds to fade the screen out (and as long back in) around the trip. 0 cuts straight there. (Field: a number.)needsInteract: true or false = false. Only go through when the player presses Interact (E, Enter, the gamepad’s Y) while touching it. (Field: on or off.)layers: text = “Player”. The collision layers that can use it, e.g. “Player”. Empty lets anything with a Body use it. (Names collision layers: their names, separated by commas.) (Field: a name.)sound: text = null. A sound played when it’s used, e.g. “Sounds/door.wav”. (A sound in Assets, e.g. “Sounds/hit.wav”.) (Field: a sound.)prompt: text = null. The name of an entity to show only while something is touching it, e.g. a “Press E” hint above the door. It’s hidden the rest of the time. (Names an entity.) (Field: an entity’s name.)locked: true or false = false. Nobody can use it while it’s locked. Switches lock and unlock it. (Field: on or off.)key: text = null. An item it needs, e.g. “Key”: it’s locked to anyone without one in their Inventory. The first trip through uses one up and clears this, so it stays open after that. (Names an item.) (Field: a name.)needsFlag: text = null. A flag that has to be set before anyone can use it, e.g. “MetKing” (set by a trigger’s Set Flag, a dialogue’s “[set MetKing]” or a script’s Game.SetFlag), or “not MetKing” for while it isn’t: it stays shut until then, and its prompt hidden. (Names a flag: “Name” holds while it’s set, “not Name” while it isn’t.) (Field: a name.)
Actions
Section titled “Actions”What anything can make it do with no code: a Trigger’s do when its message arrives, a Contraptions Wire’s input as its signal comes on, a script’s Game.Do(entity, “Name”).
Open. Unlocks it for good, key or not.Lock. Locks it: nobody can use it until it’s opened (or a switch unlocks it).
Scripts use it as Door: its methods, events and values that aren’t saved with the scene.