Jump to content

TurretCount: Difference between revisions

From ModEnc²
en>AlexB
Added remark about unexpected problems with WeaponCount.
en>Testid123
mNo edit summary
Line 16: Line 16:
{{Bugs}}
{{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.
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.
*Allows <font style="color:blue"><u><b>{{f|InfantryTypes|yes|Link}}</b></u></font> to use Weapons with '''<u><b><font style="color:blue">Burst=2</font></b></u>''' are possible.
<b>[E1]</b>
<b>TurretCount=1</b>
<b>WeaponCount=2</b>
<b>Weapon1=AGGattling</b>
<b>EliteWeapon1=AGGattlingE</b>
<b>Weapon2=AAGattling</b>
<b>EliteWeapon2=AAGattlingE</b>

Revision as of 18:39, 27 June 2024

Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
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.

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.

[E1]

TurretCount=1

WeaponCount=2

Weapon1=AGGattling

EliteWeapon1=AGGattlingE

Weapon2=AAGattling

EliteWeapon2=AAGattlingE