A_TurretFire

From SRB2 Wiki
Jump to navigation Jump to search

A_TurretFire is an action which is used to rapidly fire projectiles like a Turret. The actor will be given the flag MF2_FIRING, and so begins firing a solid stream of Var1 type Objects at the first player it finds within its distance threshold (the default Object fired is MT_TURRETLASER), setting that player as its target. It will continue firing even long after this action has been called until A_TurretStop is called, and will continuously change its angle to face the target. Var2 determines the distance threshold (default value is 2048) – if all players are further away than this when this action is called, the actor will not start firing, though this does not apply once the actor is already firing.

If the target player is playing as NiGHTS Super Sonic, the actor will attempt to predict the player next position based on their current momentum, and will instead fire there. When doing this the actor will also force its missiles' speed to become 60 FU/tic regardless of their Speed Object property.

  Actions – Projectiles [view]
A_DropMineA_FireShotA_LobShotA_MissileSplitA_MultiShotA_NapalmScatterA_ShootBulletA_SplitShotA_SuperFireShotA_SuperTurretFireA_TrapShotA_TurretFireA_TurretStopA_VileAttackA_VileFireA_VileTargetA_HoodFire