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

Difference between revisions of "TurretCount"

From ModEnc
Jump to: navigation, search
 
(Added remark about unexpected problems with WeaponCount.)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DeeZireInclusion}}<br />
+
{{Flag
The number of different VXL turrets that this VehicleType can have. This is used for two purposes, firstly for VehicleTypes which have Gunner=yes set (thus can change their turret based on the infantry unit they carry) and also for VehicleTypes which have IsChargeTurret= set so that they are 'cycled' as a pseudo-charging effect.
+
|name={{PAGENAME}}
 +
|files={{Categ|Rules(md).ini}}
 +
|values=unsigned integers
 +
|default=0
 +
|types={{Categ|VehicleTypes}}, {{Categ|BuildingTypes}}
 +
|ra2=yes
 +
|yr=yes
 +
|rp=yes
 +
}}
 +
 
 +
Specifies the amount of turrets this object has. Used for special weapon systems, for example, turret-changers ({{f|Gunner|yes|link}}), charge turrets ({{f|IsChargeTurret|yes|link}}), or gattling logic ({{f|IsGattling|yes|link}}).
 +
 
 +
In those cases, the game loads files {{Tt|''objectname''tur''%d''.vxl/hva}}, where ''%d'' represents the number between 1 and {{f|TurretCount|link}}, as opposed to plain {{Tt|''objectname''tur.vxl/hva}} it loads normally.
 +
 
 +
{{Bugs}}
 +
When setting {{f|TurretCount}} to a value greater than {{tt|0}}, see that {{f|WeaponCount|link}} is also set correctly. This has to be done because the latter is not initialized to a constant value, and garbage in memory could lead to unexpected results, like corrupting memory. In the best case it crashes when starting a game.

Latest revision as of 05:28, 20 August 2015

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: TurretCount
File(s): Rules(md).ini
Values: unsigned integers
Default: 0
Applicable to: VehicleTypes, BuildingTypes


Specifies the amount of turrets this object has. Used for special weapon systems, for example, turret-changers (Gunner=yes), charge turrets (IsChargeTurret=yes), or gattling logic (IsGattling=yes).

In those cases, the game loads files objectnametur%d.vxl/hva, where %d represents the number between 1 and TurretCount, as opposed to plain objectnametur.vxl/hva it loads normally.

Cc alert.png Bugs/Side-Effects/Unexpected Limitations

When setting TurretCount to a value greater than 0, see that WeaponCount is also set correctly. This has to be done because the latter is not initialized to a constant value, and garbage in memory could lead to unexpected results, like corrupting memory. In the best case it crashes when starting a game.