Look

From Eternity Wiki
Jump to navigationJump to search

Look (void)

Usage[edit]

Causes the object to look for targets. Various gameplay elements have an effect on acquiring a target. Friendly monsters will look for enemies first, but if they find none, will look for a player to follow. Enemies will look for players first, then friendly monsters. If none are found, they will remain asleep.

Upon waking, a monster will play its alert sound. Use of certain alert sounds by a monster will cause it to randomly use one of a set of sounds, as documented here:

- If object uses the "posit1", "posit2", or "posit3" sounds, it will use any one of these three sounds at random.

- If object uses the "bgsit1" or "bgsit2" sounds, it will use one of these two sounds at random.

- If the object has the BOSS flag in its Bits2 field, it will play its alert sound at full-volume. This is used by most DOOM and Heretic bosses by default.

After playing the sound, the object will transfer to its "first walking" state.

Notes: This codepointer should only be called from an object's initial spawn state. Calling it from a walking state can cause an infinite state cycle, which will cause an error message to appear.