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

HIST FIND

From Creatures Wiki
Revision as of 15:11, 14 September 2022 by Allekha (talk | contribs) (Created page with "'''HIST FIND''' is a CAOS command that searches the life events for a creature with a given moniker for a given life event type. ==Usage== Syntax: ''HIST FIND mon...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

HIST FIND is a CAOS command that searches the life events for a creature with a given moniker for a given life event type.

Usage

Syntax: HIST FIND moniker(str) event_type(integer) from_index(integer)

Searches from the end to the front of the moniker's event list for event_type. It will begin at the life event after from_index; use -1 to find the first occurrence of the event.

Returns the event number if it exists and -1 if it does not.

Example

The Creature History uses it to find the creature's birth event - 'birth' is event type 3:

setv va01 hist find ov01 3 -1

See also

  • HIST FINR - searches life events, but in reverse