CHEM

CHEM is a CAOS command used to output or change the amount of a given chemical in a creature's bloodstream.

CHEM for Output
Syntax: CHEM chemical#(int)

Used in place of a numeric constant or variable.

Returns the amount of the given chemical# in the creature's bloodstream.

CHEM for Input
Syntax: CHEM chemical#(int) amount(signed float)

Standalone command.

Changes the chemical# selected in the creatures bloodstream by the amount specified, this can be negative numbers to remove a chemical from a creature's bloodstream, however the amount cannot drop below 0.

Examples
CHEM being used in the command line to output the amount of 'life' in the selected creature's bloodstream: TARG NORN OUTV CHEM 125

Being used to delete the selected creature if it has less than 0.1 'life' in its bloodstream: TARG NORN SETV va00 CHEM 125 DOIF va00 < 0.1 KILL NORN ENDI

Being used to add 0.25 to the amount of life in a creature's bloodstream: TARG NORN CHEM 125 0.25

Being used to remove 0.5 from the amount of cyanide in a creature's bloodstream: TARG NORN CHEM 67 -0.5