BEHAVIOR-LOCK
Generic Room Behavior.
This behavior can be used to automatically lock a given door or object whenever a player performs an action in the given room. If the optional room argument is supplied, this behavior will open up a door/object in the specified room, otherwise the current room will be assumed. If the door or object is open, it will also be closed by this behavior.
| Arguments: | <trigger> [<room>] <object name>|<<door name> [door direction]> [.] |
| Next Lines: | [<behavior responses>] |
The following behavior will cause the north oak door to lock itself whenever someone claps their hands in the room.
Example: rb room lock social clap oak-door n
Where a number names a room, a creature or an object, its address works too: club.west-bridge, or .west-bridge in the behaviour's own zone. The number is the old form (BEHAVIOR-ADDRESSES).