A Chase

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

is one of the most important code pointers implementing Doom's monster AI. After a target has been located for a monster (using A_Look), in transitions into its chase sequence, usually repeatedly looping through animation states that call. The most basic thing that  does is to move the monster toward its target. Monsters always move in angles which are an exact multiple of 45 degrees relative to the map layout. will move a monster in the same direction for several calls before sometimes picking a new direction.

checks continually to determine whether it is possible to transition into one of its attack states. If the monster is sufficiently close to the player and has a melee attack, it will transition into its melee attack state. Otherwise, if the monster has a distance attack and can see the player, it may transition into its distance attack state (firing a weapon or launching a projectile).

In a network game,  may cause a monster to pick a new player as a target if it can no longer see its current target. Finally, it occasionally plays the monster's "active sound" if it has one - an example is the "imps nearby" sound periodically emitted by imps while they are roaming.

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

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

Pointer 21 (Frame 34) Codep Frame = 735

Or using BEX syntax:

[CODEPTR] Frame 1234 = Chase