Join two maps with doors
link_mapsCreate both ends of a door connection between RPG Maker MZ maps and validate landing cells so transfers don't strand players in walls.
Instructions
Write both ends of a connection in one call: a door event on each map that transfers the player to the other, with a graphic (!Door1, a tile, or nothing for an invisible exit), the door sound, the fade, and the direction they arrive facing. a and b are the doorway cells, and a player coming through one does not stop on it: they arrive at the first open cell beside the far door (above it, then right, left, below) facing away, and the reply's landed says which cell that was. Pass land on an end to choose it yourself — including the doorway cell itself, which is what the transfer onto the threshold used to do. A door walled in on all four sides has nowhere beside it, so it keeps the doorway and the answer carries a warning. The reason it exists is the check it does first: a player-touch door only fires when the player can stand on its cell, and a destination cell that is blocked means the player arrives stuck inside a wall with no way back — both of which a transferred playtest surfaces minutes later as 'nothing happens'. requires writes a locked pair of pages: page 0 refuses, page 1 (conditioned on the switch or item) does the transfer. twoWay: false leaves the far end alone — no door is written there, so its coordinates are the destination itself and nothing shifts. Both maps come back rendered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | One end of the link | |
| b | Yes | The other end | |
| fade | No | 0 none, 1 black (default), 2 white | |
| sound | No | SE played on the way through; default Door1, pass null for silence | |
| twoWay | No | Default true: an event at each end, each leading to the other | |
| graphic | No | A sheet name (!Door1), {tileId: n}, or "none" for an invisible exit. Default !Door1 | |
| replace | No | ||
| requires | No | Gate both doors behind this condition. A condition is one of {switch: id, value?}, {selfSwitch: "A".."D", value?}, {variable: id, op?: "=="|">="|"<="|">"|"<"|"!=", value: n or {variable: id}} (op defaults to ">="), {item: id}, {weapon: id}, {armor: id}, {gold: n} (at least n), {actor: id, state?|skill?}, {button: "ok", pressed?}, or {code: 111, parameters: [...]} to write the engine's own shape. | |
| direction | No | Which way the player faces on arrival; by default they face away from the door they came through, and 0 keeps the direction they were walking (the engine ignores a 0 and leaves the facing alone) | |
| lockedMessage | No | What the locked door says instead of transferring |