A_Chase

From SRB2 Wiki
Jump to navigation Jump to search
This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.
To do
More info needed on conditions for MeleeState and MissileState attacks

A_Chase is an action that makes the actor move towards the player in the most direct of the eight cardinal directions (north, northeast, east, etc). The distance to move, in fracunits, is set by the actor's Speed property. This action strictly alters the actor's position; momentum is not modified. When used repeatedly, it works well for the basic movement of grunt enemies such as the Crawlas. If the actor's target does not exist or is dead, the actor will look for a new target player; if none can be found, it returns to its SpawnState.

If Var1 is set to 0, the actor will use its MeleeState or MissileState to attack the player when certain conditions are met, provided the actor actually has the respective states set. Note that the MeleeState attack's conditions will be checked first. When the actor's MeleeState is used, the actor's AttackSound is played; this is not the case for the MissileState. If Var1 is set to 1, the MeleeState is not used. If set to 2, the MissileState is not used. If set to 3, neither are used.

If the actor uses its MissileState, MF2_JUSTATTACKED will be applied to the actor's secondary flags to prevent the actor from attacking again for the single next use of this action, after which MF2_JUSTATTACKED will be removed and the actor can continue as usual.

Each time this action is used, the actor's reaction time will be reduced by 1 until it reaches 0.

Object property Use
SpawnState Goes back to this state if no players can be found
MeleeState Attack state 1 (Unless Var1 = 1 or 3)
MissileState Attack state 2 (Unless Var1 = 2 or 3)
AttackSound Sound for attack state 1 (Unless Var1 = 1 or 3)
Speed Distance to move, measured in fracunits
Var1 Effect
0 Both MeleeState and MissileState are used
1 MissileState is used; MeleeState is not used
2 MeleeState is used; MissileState is not used
3 Both MeleeState and MissileState are not used

Variants of A_Chase

Actions that use A_Chase internally

  Actions – Movement [view]
A_BubbleRiseA_BunnyHopA_CapeChaseA_ChaseA_FishJumpA_ForceStopA_HomingChaseA_InstaLoopA_KnockBackA_MouseThinkA_MoveAbsoluteA_MoveRelativeA_PushAwayA_ScoreRiseA_SkullAttackA_ThrustA_ZThrust