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

DIRN

From Creatures Wiki
Revision as of 02:24, 3 January 2022 by Allekha (talk | contribs) (Created page with "'''DIRN''' is a CAOS command used to change or output the direction a creature is facing. ==Usage== ===Command=== Syntax: ''DIRN direction(integer)'' Sets the direc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DIRN is a CAOS command used to change or output the direction a creature is facing.

Usage[edit]

Command[edit]

Syntax: DIRN direction(integer)

Sets the direction a creature is facing. 0 is north (away from screen), 1 is south (toward screen), 2 is east (player right) and 3 is west (player left).

Function[edit]

Syntax: DIRN

Returns an integer as above describing the direction a creature is currently facing.

Examples[edit]

The Holistic Learning Machine makes creatures pose a certain way and face toward the player:

pose 170
dirn 1

The speech bubble script adjusts its position depending on which way the creature is facing:

doif dirn eq 2
	setv va01 posr
	subv va01 va04
else
	setv va01 posl
endi