Set Exit Command
map.setExitCommand(roomId: number, dir: string, cmd: string)
Sets the exit command for a specific direction
Param | Type | Description |
---|---|---|
roomId | number | ID of the exit source room |
dir | string | Direction (full or abbreviated) |
cmd | string | Command(s) to execute in place of direction dir |
Example
js
// execute a command to open a door before moving north
map.setExitCommand(100, "north", "open door;north");