ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

MissileROTVar

From ModEnc
Jump to navigation Jump to search
Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: MissileROTVar
File(s): rules(md).ini
Values: Floating point values: Any decimal number (clearer range should be added in Template:Values).
Applicable to: General

Logic related to MissileROTVar, as a whole or in part, is obsolete in Tiberian Sun, Red Alert 2 and/or Yuri's Revenge.



Specifies the rate of turn (ROT) fluctuation percentage of guided missiles (projectiles with ROT greater than 0). As the missile travels, its ROT is recalculated every frame based on this variable: the larger the value, the higher the variation in the missile's ROT.

Note that on regular missiles the effect is barely noticable, even with extreme MissileROTVar values, as the ROT never falls below what's stated on the projectile's rules. The lower the projectile's default ROT, the more noticable the effect is. For example, projectiles with ROT=1 and a high enough variance (e.g. 2.0) causes the projectiles to randomly scatter around the target instead of hitting it perfectly.

Pseudocode

Simplified pseudocode:

currentROT = (sin(((frame % 15) / 3) * 2 * π) * MissileROTVar + MissileROTVar + 1) * ROT

See Also

MissileSpeedVar