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


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]


Syntax: LOCK

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


In an eat script, from the Basic fruit script:

*****eat script
scrp 2 8 1000 12
	sndc "chwp"
	stim writ from 78 1
	kill ownr

See also[edit]