Welcome to the Creatures Wiki! Log in and join the community.
TOUC
Jump to navigation
Jump to search
TOUC is a CAOS command and function that either makes a creature reach out to touch the IT agent, or returns if two agents are touching each other.
Contents
Usage[edit]
Command[edit]
Syntax: TOUC
Makes creature attempt to reach out to touch the IT agent. The script continues when the creature either reaches the agent or it cannot while fully stretched out. This usage is found in the scripts related to creature actions.
Function[edit]
Syntax: TOUC first(agent) second(agent)
Returns 1 if the two agents are touching or 0 if they are not.
Example[edit]
A critter running an eating subroutine when it catches its prey:
*where ov00 is the target prey agent doif touc ownr ov00 eq 1 gsub eat endi