A_FastChase
A_FastChase
(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. |
This function makes the calling actor advance on its target while randomly attempting to strafe left or right. The actor may enter an attack state (if it has one) at any time. As this function maintains a certain distance between the calling actor and its target, it is not always advisable to use it for actors who only possess a melee attack.
The three “player bosses” in Hexen use this function to obtain their distinctive movement.
Note that the calling actor will ignore their MaxDropOffHeight property when strafing, and so may strafe off cliffs or into pits from which they cannot escape. Setting the NODROPOFF flag will prevent this from happening.
Examples
Here is an example of a cacodemon which tries to dodge attacks and strafe around the player.
ACTOR Smartcaco : Cacodemon { States { See: HEAD A 2 A_FastChase Loop } }