SetDoorLockSides
Makes a locked door locked from both sides - its bolt’s side asks for the key too.
A level door’s lock has two sides: a keyhole outside and a bolt inside. Locked, the outside asks for the key (or a lockpick), but
the inside shows a plain “Open” and unbolts the door for anyone - the way a house is left in the story. "both" makes the inside
ask for the key as well: the player with its key gets “Unlock and open”, one who can pick locks gets the lockpick, and anyone
else sees “Locked”. "game" gives the door its own lock back. A door the mode locked that has no lock of its own
(SetDoorState) opens for anyone from either side unless it is "both". key may be "*": every door of the level (a door’s
own "both" stays when "*" goes back to "game"). Keys of the mode’s own make a door’s key: SetDoorKey.
Syntax
Section titled “Syntax”SetDoorLockSides(key, sides)| Parameter | Type | |
|---|---|---|
key |
string | the door’s level name, or "*" for every door |
sides |
string | "both" or "game" (the default) |
Returns
Section titled “Returns”boolean - false for another word, an empty or too long key, or past 4096 doors
Example
Section titled “Example”-- the houses players own: locked, they open with the owner's key from either sidefor key, house in pairs(HOUSES) do SetDoorLockSides(key, "both") SetDoorKey(key, house.keyId) SetDoorState(key, false, true)endSee also
Section titled “See also”GetDoorLockSides · SetDoorKey · OnPlayerUseDoor · SetDoorState · the Doors and containers group of the index
