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

BYIT

From Creatures Wiki
Jump to navigation Jump to search

BYIT is a CAOS function that returns if the creature is within reach of the target agent of their attention or not.

Usage

Syntax: BYIT

Returns 1 if the creature is within reach, or 0 if it isn't.

Example

This command is used in the creature interaction scripts. From the hit script:

doif byit eq 0
	*if the creature is not within hitting range, stim it with disappointment
	stim writ targ 0 1
	wait 10
	stop
endi