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

ESEE

From Creatures Wiki
Revision as of 06:15, 18 June 2017 by ScoobyGambit (talk | contribs)
Jump to navigation Jump to search

ESEE is a CAOS command which controls flow. It is used in Creatures 2 and in Creatures 3/Docking Station.

Usage

Syntax: ESEE 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 and which can be 'seen' by the original agent. Whether an agent can be seen by the agent which is doing the counting is determined as follows: an agent can see another agent if it is within range, its permeability allows it to see through all intervening walls, and for creatures, the ATTR Invisible isn't set.

The counting cycle works by first setting TARG, then setting the limits, 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 within the limits have been exhausted.

Any or all of the arguments may be 0, which is a wildcard. So ESEE 0 0 0 will loop through all agents within the limits of the counting agent.

At the end of the ESEE loop, in C3/DS, TARG is not set to OWNR. For smart vendors, it's important to manually reset the TARG to OWNR.

When ESEE is used in installation scripts, where there is no OWNR, TARG is used instead.

In Creatures 2, all commands between ESEE and ENUM run instantaneously. CDN archive

Example

See also

  • ENUM - catch-all enumeration loop
  • ETCH - 'touching' enumeration loop
  • EPAS - vehicle's passengers
  • ECON - port connections
  • STAR
  • SEEE