ENUM is a CAOS command which controls flow.


Syntax: ENUM family (int) genus (int) species (int)

This marks the start of an enumeration loop, which must be ended by NEXT. It cycles through every agent which matches the classifier: first setting TARG, then evaluating the content of the loop, then going on to the next agent, and so on until all agents of the given class number have been exhausted.

Any or all of the arguments may be 0, which is a wildcard. So ENUM 0 0 0 will loop through all agents.

At the end of the loop, TARG is set to OWNR - so store the original TARG somewhere else if it's important.


Destroy all badbugs:

ENUM 2 14 0

Limit elasticity of all toys:

ENUM 2 21 0
  DOIF ELAS gt 50
    ELAS 50

Age all creatures to adult:

ENUM 4 0 0
  SETV va00 4
  SUBV va00 CAGE
  DOIF va00 gt 0
    AGES va00

Show the bounding boxes of everything:

ENUM 0 0 0
  DCOR 1

See also

  • ESEE - 'visible' enumeration loop
  • ETCH - 'touching' enumeration loop
  • EPAS - vehicle's passengers
  • ECON - port connections

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.