A_PushAway
A_PushAway is an action that pushes the actor's target or tracer away from the actor itself. In contrast to A_KnockBack
, the direction of the horizontal thrust depends on the position of actor and target compared to each other. Var1 specifies the magnitude of the horizontal thrusting force to push away the actor's target or tracer with – if Var1 is negative, the Object will instead be pulled towards the actor.
The upper 16 bits of Var2 determines whether the actor's target (0) or the actor's tracer (1) will be pushed away by this action. If the chosen Object does not exist, this action will do nothing. The lower 16 bits of Var2 determine the method of pushing away the chosen Object this action uses:
Var2, lower 16 bits | Function | Description |
---|---|---|
0 | P_Thrust
|
The pushed Object's old momentum is retained, and the new pushing thrust force is added on in the new direction; i.e. Pushing thrust = Old momentum + Var1
Note: If |
1 | P_InstaThrust
|
The pushed Object's old momentum is lost in favor of the new pushing thrust force; i.e. Pushing thrust = Var1 |
This action originates from the v2.0 modification SRB2Morphed and was added to SRB2 itself in v2.1.
|
Actions – Movement | [view] | |
A_BubbleRise • A_BunnyHop • A_CapeChase • A_Chase • A_FishJump • A_ForceStop • A_HomingChase • A_InstaLoop • A_KnockBack • A_MouseThink • A_MoveAbsolute • A_MoveRelative • A_PushAway • A_ScoreRise • A_SkullAttack • A_Thrust • A_ZThrust |