A_ZThrust

From SRB2 Wiki
Jump to: navigation, search

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. In SRB2, this action is used by the RBZ Spike.

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_BubbleRiseA_BunnyHopA_CapeChaseA_ChaseA_FishJumpA_ForceStopA_HomingChaseA_InstaLoopA_KnockBackA_MouseThinkA_MoveAbsoluteA_MoveRelativeA_PushAwayA_ScoreRiseA_SkullAttackA_ThrustA_ZThrust