LOCK

LOCK is a CAOS command that causes the following commands to be executed without being interrupted by anything else, until the script is unlocked with the UNLK command. Examples of what could interrupt a script in the middle of its function could be a creature repeatedly trying to perform the same action on an object, or by other scripts for the object kicking in (push, pull, hit, eat). As of Creatures 2, external events that occur while a script is locked, like timer scripts, don't interrupt locked scripts, and don't wait to be executed after the lock.

Usage
Syntax: LOCK

Causes the following commands to be executed without interruption until UNLK is reached.