A_Look
From DoomWiki.org

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:
- 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.
- 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.
Uses[edit]
The A_Look
code pointer appears in the following states in Doom's state table:
Frame number | Doom internal name | Use |
---|---|---|
174 | S_POSS_STND | normal animation for the Trooper |
175 | S_POSS_STND2 | normal animation for the Trooper |
207 | S_SPOS_STND | normal animation for the Sargeant |
208 | S_SPOS_STND2 | normal animation for the Sargeant |
241 | S_VILE_STND | normal animation for the Archvile |
242 | S_VILE_STND2 | normal animation for the Archvile |
321 | S_SKEL_STND | normal animation for the Revenant |
322 | S_SKEL_STND2 | normal animation for the Revenant |
362 | S_FATT_STND | normal animation for the Mancubus |
363 | S_FATT_STND2 | normal animation for the Mancubus |
406 | S_CPOS_STND | normal animation for the Chaingun Sargeant |
407 | S_CPOS_STND2 | normal animation for the Chaingun Sargeant |
442 | S_TROO_STND | normal animation for the Imp |
443 | S_TROO_STND2 | normal animation for the Imp |
475 | S_SARG_STND | normal animation for the Spectre and Demon |
476 | S_SARG_STND2 | normal animation for the Spectre and Demon |
502 | S_HEAD_STND | normal animation for the Cacodemon |
527 | S_BOSS_STND | normal animation for the Baron of Hell |
528 | S_BOSS_STND2 | normal animation for the Baron of Hell |
556 | S_BOS2_STND | normal animation for the Hell Knight |
557 | S_BOS2_STND2 | normal animation for the Hell Knight |
585 | S_SKULL_STND | normal animation for the Lost Soul |
586 | S_SKULL_STND2 | normal animation for the Lost Soul |
601 | S_SPID_STND | normal animation for the Spiderdemon |
602 | S_SPID_STND2 | normal animation for the Spiderdemon |
632 | S_BSPI_STND | normal animation for the Arachnotron |
633 | S_BSPI_STND2 | normal animation for the Arachnotron |
674 | S_CYBER_STND | normal animation for the Cyberdemon |
675 | S_CYBER_STND2 | normal animation for the Cyberdemon |
701 | S_PAIN_STND | normal animation for the Pain Elemental |
726 | S_SSWV_STND | normal animation for the SS Nazi |
727 | S_SSWV_STND2 | normal animation for the SS Nazi |
784 | S_BRAINEYE | normal animation for the Demon Spawner |
Example[edit]
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:
[CODEPTR] Frame 1234 = Look