Skip to content

five-on-it / packages/sim/src/doors / setDoor

Function: setDoor() ​

setDoor(sim, eid, open, locked?, lock?): void

Defined in: packages/sim/src/doors.ts:130

Opens a door to one side (open 1 or 2) or shuts it (0), its collider with it; with locked, locks or unlocks it (a number is the lock's state itself: DOOR_KEYPAD for a keypad's), and with lock, sets the tag its key answers to.

Parameters ​

sim ​

SimWorld

eid ​

number

open ​

number

locked? ​

number | boolean

lock? ​

string

Returns ​

void