A DoChase
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
void A_DoChase (State melee, State missile, int flags = 0)
Usage
Functions like A_Chase, but can accept direct states instead of state labels. Otherwise works the same as A_Chase, which is itself a wrapper for this function.
Parameters
- State melee
- The melee State to go to, by default this would be the actor's meleestate (the "Melee" state sequence).
- State missile
- The missile State to go to, by default this would be the actors' missilestate (the "Missile" state sequence).
- int flags
- The flags that determine the chase calls' behavior, these are the same CHF_ calls as A_Chase:
- Flags can be combined by using the
|
character between the constant names.- CHF_FASTCHASE – Actor will randomly attempt to strafe left or right around the target, like the "player bosses" in Hexen. Note that the calling actor will ignore their MaxDropOffHeight property when strafing, and so may strafe off cliffs or into pits from which they can not escape. Setting the NODROPOFF flag will prevent this from happening.
- CHF_NOPLAYACTIVE – Actor will not play active sounds.
- CHF_NIGHTMAREFAST – Actor will move twice as fast in Nightmare! difficulty setting or equivalent.
- CHF_RESURRECT – Actor will enter the "Heal" state (if defined) upon encountering a revivable corpse, like the Arch-Vile.
- CHF_DONTMOVE – Actor will not move.
- CHF_NORANDOMTURN – Actor will not change its chasing angle to its target if its beyond a certain degree until something blocks the way (obstacle or wall).
- CHF_NODIRECTIONTURN – Actor will not turn its angle to face the direction of travel.
- CHF_NOPOSTATTACKTURN – Actor will not turn itself to its target after attacking.
- CHF_STOPIFBLOCKED – Actor cannot turn away from obstacles blocking it. It will simply not move, but can still angle itself.
- CHF_DONTIDLE – Hostile actors will not jump to their Spawn or Idle state once they no longer have a target. Allowing you to define custom states for them to jump to, when they have no target.
- CHF_DONTTURN – Implies CHF_NORANDOMTURN, CHF_NOPOSTATTACKTURN and CHF_STOPIFBLOCKED.