A_VileChase

From ZDoom Wiki
Jump to: navigation, search

A_VileChase

(no parameters)


Note: This function has been superseded by A_Chase, which duplicates and extends its functionality. Use of the newer function is advised in order to maintain maximum flexibility in your code.


Usage

This function makes the calling actor advance on its target. The actor may enter an attack state (if it has one) at any time. If the calling actor comes into contact with a corpse, it will enter the “Heal” state (if one exists) and resurrect the actor in question (provided the actor being revived has a “Raise” state defined).

The function is named after Doom II's Archvile, where the “healing” ability originated from.

Examples

The archvile uses A_VileChase since it is able to revive monsters, entering its heal state whenever it comes across the corpse of a monster that can be revived.

ACTOR Archvile 64
{
  States
  {
  See:
    VILE AABBCCDDEEFF 2 A_VileChase
    Loop
  Heal:
    VILE "[\]" 10 Bright
    Goto See
  }
}