|This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki bythis article.|
A_OrbitNights is an action that is used to make the Chaos Emeralds that appear in NiGHTS-themed Special Stages – after destroying the Ideya Capture – orbit around Super Sonic as he flies around the track. The actor will orbit around its target, with a fixed radius of 32 fracunits, as long as it is a player who is playing as Super Sonic in a NiGHTS level, otherwise it will remove itself from existence. The actor's Z position will also oscillate as it orbits the target player.
Var1 determines the angle increment to apply for each use of this action; this action should be called every tic for the actor to orbit around its target properly. The value in degrees cannot simply be placed here however – instead, the angle constants should be used here; e.g.
ANG2*2 for an angle increment of 4 degrees/tic (the angle increment used by the orbiting Chaos Emeralds). Note that Var1 will also affect the rate at which the actor modifies its Z position accordingly with the horizontal movement.
The lower 16 bits of Var2 determine the offset of the angle calculated for the actor's Z position – unlike with Var1, the value for Var2 lower 16 bits is to be given in degrees as an integer. If the lower 16 bits of Var2 is set to 0, the actor will appear to orbit its target in a tilted elliptical orbit, rather than just oscillating vertically while orbiting its target in a horizontal circle. Note that the actual Z position of the actor will be 16 fracunits above the Z position of the actor's target, offsetted by up to 20 fracunits in either direction relative to this position.
The upper 16 bits of Var2 determine whether the actor is a Nightopian Helper or not; any value other than 0 will turn this effect on. When turned on, the actor additionally requires the target player's Nightopian Helper powerup timer (
pw_nights_helper) to still be in effect; if it is not, the actor will remove itself from existence. This feature is used by the Nightopian Helper that orbits the player while the power-up is in effect.
|Actions – Rotational movement||[view]|
|A_Custom3DRotate • A_MaceRotate • A_OrbitNights • A_RotateSpikeBall • A_SparkFollow • A_UnidusBall|