NULL

NULL is a CAOS command.

Usage
Syntax: NULL

Returns the null agent.

Some commands, such as TARG, OWNR, _IT_ and others, may return NULL.

You cannot act on the null agent. Attempts to do so will result in Invalid agent.

Note that NULL ne 0 because they are of different types.

Examples
Null is often used in ENUM scripts to check if the TARG agent still exists: enum 4 0 0 doif targ eq null kill ownr endi next
 * This example enumerates through all creatures and kills the ownr agent if the creature no longer exists

The opposite, doif targ ne null, is used in the snotrock and Ghosthande's Hungry Critter Tutorial to help the snotrocks hunt tubas, which may vanish before the snotrock can get to them! By checking that the target agent does not not exist, the critter does not get stuck on a phantom foodstuff.