A_FishJump is an action that makes the actor jump up if it is on the ground or at least 64 fracunits below a water surface. It is recommended that this action be called every tic for it to work properly. In SRB2, this action is used by the SDURF and the Puma.
The strength of the actor's jump can be determined by this action in one of two ways:
- If Var1 is set to 0, the actor's angle determines the strength of the actor's jump. Specifically, the jump strength is calculated as actor's angle ÷ 4; for example, an angle of 40° gives a jump strength of 10 fracunits/tic. Assuming the actor does not change its angle, via other actions or a thinker and so on, this means that the actor's jump strength can be controlled by the Angle value set for its map Thing when placed in a map editor. This method of setting the jump strength is used by both the SDURF and Puma.
- If Var1 is a value other than 0, Var1 itself determines the strength of the actor's jump. Var1's value is treated as a fixed-point number, so the jump strength you want (in fracunits/tic) should be multiplied by
If the actor's Var1 and angle are both 0, it uses a default jump strength of 11 fracunits/tic; this is equivalent to a Var1 value of 11*
FRACUNIT, or an angle of 44°.
Note: The jump strength is scaled with the actor's scale, unless it is determined by Var1. In this case, the actor's jump will have the same strength regardless of the actor's scale.
The actor's displayed animation is also controlled by this action, depending on its point in the jump; the actor's
SeeState should be set to the first state of the actor's jumping up animation, the actor's
MeleeState should be set to the first state of the actor's falling down animation, and the actor's
XDeathState should be set to the last state in the falling down animation (if the actor has only one falling down state,
XDeathState should have the same value). This means that that every time the actor starts a jump, the actor will change its state to
SeeState. If the actor is instead falling down, this action checks if the actor's current state ID is between
XDeathState, and switches its state back to
MeleeState if it is outside of this state range. Note that this action will not call the actions of either
||The actor's jumping up state; The actor changes its state to this value each time it jumps|
|| First state of actor's falling down animation; If the actor is falling and current state ID number < |
|| Last state of actor's falling down animation; If the actor is falling and current state ID number > |
|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|