# A_ZThrust

A_ZThrust is an action that thrusts the actor vertically. Var1 determines the magnitude of the thrusting force, measured in fracunits/tic – a positive value will thrust the actor upwards, while a negative value will thrust the actor downwards. If the actor is in reverse gravity, the force applied will be flipped also. Similarly, the force will also be scaled with the actor if it is at a different scale from the default.

Var2 determines the method of thrusting the actor this action uses – specifically, the upper 16 bits toggle old vertical (Z) momentum retainment, and lower 16 bits toggle old horizontal (X and Y) momentum retainment. The table below shows how different values of Var2 affect the actor with this action:

Var2 Description
Upper 16 bits Lower 16 bits
0 0 The actor's old vertical momentum is retained, and the new thrust force is added on in the new direction; i.e. Vertical thrust = Old momentum + Var1

The actor's horizontal momentum, if any is present, is unaffected by this action.

Note: If `A_ZThrust` is used repeatedly using this option, the actor will accelerate at a rate of Var1 fracunits/tic for each use of the action.

0 1 The actor's old vertical momentum is retained, and the new thrust force is added on in the new direction; i.e. Vertical thrust = Old momentum + Var1

The actor's horizontal momentum is lost, forcing the actor to move directly up or down.

Note: If `A_ZThrust` is used repeatedly using this option, the actor will accelerate at a rate of Var1 fracunits/tic for each use of the action.

1 0 The actor's old vertical momentum is lost in favor of the new thrust force; i.e. Vertical thrust = Var1

The actor's horizontal momentum, if any is present, is unaffected by this action.

1 1 The actor's old vertical momentum is lost in favor of the new thrust force; i.e. Vertical thrust = Var1

The actor's horizontal momentum is lost, forcing the actor to move directly up or down.

This action originates from the v1.09.4 modification ShufflarB2 and was added to SRB2 itself in v2.0.

 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