From DoomWiki.org

An arch-vile in the process of resurrecting an imp, displaying the first animation frame of its healing sequence, VILE[.

A_VileChase is a code pointer used in the normal animation for the arch-vile.

Each time A_VileChase is called, it calculates the blockmap area to be searched and calls PIT_VileCheck for each of the entities inside this area to determine if it is a corpse that can be resurrected. To pass the check, an object must fulfill several conditions: it must have the MT_CORPSE flag set, designating it as a corpse; its current animation frame must have a duration of -1 (meaning it lasts indefinitely); it must have a raise state (arch-viles, lost souls, cyberdemons and spider masterminds lack such a state); it must be no further away than its own radius plus the radius of the monster calling A_VileChase (meaning their collision boxes must touch); and it must be inert and positioned in a location where it can be resurrected, and that is not also currently occupied by another actor, like the player or a monster. If all these conditions are met, A_VileChase will set the found corpse as a temporary target and call A_FaceTarget. After this, it switches back to the previous target (player, monster or none) and jumps the monster performing the resurrection to its S_VILE_HEAL1 state, the first state of the arch-vile's heal sequence. This state (#266) and its associated animation frame (VILE[) are hard-coded to be transitioned to after A_VileChase initiates A_FaceTarget. After this, the target emits the gibbing sound (DSSLOP), and its raise state is triggered. The target's health, height, radius and flags are all set to their default values, placing it in its spawn state. In the case of the arch-vile, once it has finished its heal sequence, it will return to the beginning of its walk state, calling A_VileChase again.

If A_VileChase fails to find a corpse to resurrect, it will transition to A_Chase instead.


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


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

Pointer 21 (Frame 34)
Codep Frame = 254

Or using BEX syntax:

Frame 1234 = VileChase

External links[edit]