CAOS Language Guide

General Object Commands

Macro

Description

VA00-VA99

Temporary script variables that only exist for the duration of the script execution. VA00 to VA09 map directly to VAR0 to VAR9.

RValue and LValue

OV00 –OV99

Permanent script variables that persist across all scripts of an object. OV00 to OV02 map directly to OBV0 to OBV2.

RValue and LValue

_P1_ , _P2_

Macro script parameters specified in command MESG WRT+.

RValue only

CLS2 family genus species

Used when creating an object, this is how you assign it a unique classifier. Parameters specified as separate integer values., for example: SETV CLS2 2 10 300 would assign the current object to belong to family 2, genus 10 and species 300.

LValue only

UNID

Unique Identifier. A UNID of zero is invalid and indicates that the object does not exist.

Note: This command has been left in for completeness, because using TARG will produce the same results.

RValue only

GRAV

Gravity. 1 = on, 0 = off. When an object is falling GRAV has a value of 1, set it to 1 to make it fall.

RValue and LValue

WALL

Collision script specific parameter. WALL last collided with. 0 = left, 1 = right, 2 = up, 3 = down, 4 = unknown.

RValue only

KILL object

Delete the object specified. i.e. KILL EDIT deletes the object in the EDIT buffer, KILL OWNR kills the owner of the script, KILL TARG kills the current TARG object.

Command only

RELX

Relative X. Returns the relative position of object Targ from the script Owner object.

RValue only

RELY

Relative Y. Returns the relative position of object Targ from the script Owner object.

RValue only

TICK

TICK value

Sets/returns the object timer script tick rate. Set TICK to 0 to stop the timer script executing.

Command and RValue.

FRZN

Sets/returns whether an object is Frozen. Can be 1 or 0. When an object is frozen it no longer receives updates and, in the case of creatures, external stimuli.

RValue and LValue

POSX

Position X. Returns the X co-ordinate of the centre point of object Targ.

RValue only

POSY

Position Y. Returns the Y co-ordinate of the centre point of object Targ.

RValue only

POSL

Returns the object’s Position – Left edge of object

RValue only

POSR

Returns the object’s Position – Right edge of object

RValue only

POSB

Returns the object’s Position – Bottom edge of object

RValue only

POST

Returns the object’s Position – Top edge of object

RValue only

LIML

Returns object’s Limit to the Left as absolute value of rooms boundary

Note: Room boundaries are not the same as walls, rooms can join but still allow full passage between them.

RValue only

LIMR

Returns object’s Limit to the as absolute value of rooms boundary

Note: Room boundaries are not the same as walls, rooms can join but still allow full passage between them.

RValue only

LIMB

Returns object’s Limit to the Bottom as absolute value of rooms boundary

Note: Room boundaries are not the same as walls, rooms can join but still allow full passage between them.

RValue only

LIMT

Returns object’s Limit to the Top – i.e. how far away from a room boundary

Note: Room boundaries are not the same as walls, rooms can join but still allow full passage between them.

RValue only

FMLY

Returns the object’s family

RValue only

GNUS

Returns the object’s genus

RValue only

SPCS

Returns the object’s species

RValue only

MOVS

Returns the Movement Status of an object. See reference section for values.

RValue and LValue

ACTV

Returns objects Active status. See reference section for values.

RValue and LValue

NEID

Returns an objects Neural ID – i.e. which attention lobe neurone corresponds to this object

RValue only

TOTL family genus species

Returns the number of objects in the world who fit this specifier

RValue only

TOUC object1 object2

Returns 1 if these two objects are in contact. e.g. DOIF TOUC TARG OWNR GT 0.

RValue only

SLIM

Set the limits of the target object, this is needed when an object is first put into the world (or after a MCRT command) because it appears in a state where it’s boundary limits are not defined.

Command only

ADDV value1 value2

value1 = value1 + value2

Command only

SUBV value1 value2

value1 = value1 – value2

Command only

MULV value1 value2

value1 = value1 * value2

Command only

DIVV value1 value2

value1 = value1 / value2

Command only

MODV value1 value2

Performs a modulo arithmetic on the two values

Command only

NEGV value

value = 0 – value

Command only

ANDV value1 value2

value1 = 1 if value1 = 1 and value2 = 1

Command only

ORRV value1 value2

Performs a logical OR on the two values given

Command only

RNDV variable min max

Set a variable to a random number between min and max.

Command only

SETV variable value

Set a variable to have the value value.

Command only

BBLE [text] duration type location

Create a speech bubble object containing the given text for the specified number of ticks.

duration – the number of ticks to display the bubble for

type – 0=speech bubble, 1=think bubble

location – 0=track owner, 1=centre in viewport

Command only



Creatures 2 CAOS Language Guide

Introduction

Macro Commands

Reference