Welcome to the Creatures Wiki! Log in and join the community.

LOCK

From Creatures Wiki
(Redirected from Lock)
Jump to navigation Jump to search

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.[1]

Usage[edit]

Syntax: LOCK

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

Example[edit]

See also[edit]