A_HealChase

From DoomWiki.org

A_HealChase(state, sound) is a generic version of the A_VileChase function that is part of the MBF21 specification. It combines A_Chase with the ability to resurrect nearby corpses (see A_VileChase article for details), but without being bound to A_VileChase's hardcoded behavior (transitioning to state 266, displaying the VILE[ sprite, and playing DSSLOP). It has two parameters, using the values provided in the "Args1" and "Args2" fields as arguments.

The first argument defines the state to jump to when resurrecting a corpse, while the second argument sets the sound to be played alongside the resurrection. Neither of these parameters have a default lump to fall back on, so if valid arguments are not provided, the calling actor will be transitioned to NULL, removing it from the map, and no sound will be played. Both arguments are passed to the function as numeric values, using the DeHackEd state and sound number, respectively.

Example[edit]

The following is an example of how to set the A_HealChase code pointer in a DeHackEd file using BEX syntax:

Frame 1234
Next frame = 1234
Duration = 2
Args1 = 12345
Args2 = 31

[CODEPTR]
FRAME 1234 = HealChase

Or using DECOHack syntax:

state 1234 
{
 TNT1 A 2 A_HealChase(heal, "slop")
 loop
}

Note that DECOHack allows the use of custom state labels and requires lump names for sounds in place of numbers.

External links[edit]