TurretChargeAnimRate
How many game frames each step of a building's weapon charge takes.
- Applies to
- BuildingType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- integer
- When omitted
3
TurretChargeAnimRate sets how long a building with a Charges=yes primary weapon takes to charge before it can fire. A higher value makes the wind-up slower.
The charge counts from the Start frame of the building’s TurretAnim animation up to that animation’s LoopEnd frame. It advances one frame every TurretChargeAnimRate game frames, and the weapon can fire once the count reaches LoopEnd. The wind-up therefore takes about (LoopEnd - Start) * TurretChargeAnimRate game frames. If the turret animation has ended before the count gets there, the charge completes at frame 12 instead.
A building at or below ConditionYellow health starts its charge with TurretAnimDamaged, so that animation’s Start and LoopEnd set the count.
[MYOBELISK] ; a BuildingType registered in [BuildingTypes]Primary=MyChargeLaser ; a WeaponType with Charges=yesTurretAnim=MYOBEL_C ; an AnimType registered in [Animations]TurretChargeAnimRate=1 ; the count advances every game frameA ChargeAnim=yes building shows the turret animation frame the count has reached, so the rate also sets how fast that animation appears to play. Charges covers when charging starts, what empties the charge, and when a shot spends it.