From DoomWiki.org

Revision as of 03:19, 14 July 2023 by Xymph (talk | contribs) (avoid redirect)

Zombiemen at the start of MAP01 in their spawn state, cycling through A_Look to try to locate a target.

A_Look is a code pointer used in the normal animation for various monsters.

A_Look scans the immediate area for targets (ie. players to attack). Most monsters are initially spawned cycling through a series of states that repeatedly call A_Look. The following strategies are used to find a target:

  1. The sound target of the sector that the monster is standing in is checked; if the player fires a weapon, the monster will wake up and attack, unless the monster has the ambush/deaf flag set.
  2. The monster checks if it can see any players who are still alive and still in the game. Players must be in the 180 degree field in front of the monster.

When a target is located, the monster plays its "see sound" (for example, in the case of an imp that is DSBGSIT1 or DSBGSIT2) and jumps to the "see state" that will lead it to attack the player by calling A_Chase.


The A_Look code pointer appears in the following states in Doom's state table:


The following is an example of how to set the A_Look code pointer in a Dehacked file:

Pointer 21 (Frame 34)
Codep Frame = 784

Or using BEX syntax:

Frame 1234 = Look

External links