OccupyWeapon
Flag: | OccupyWeapon |
File(s): | rules(md).ini |
Values: | Strings: Normal text. (Limited to: Weapons) |
Default: | Primary |
Applicable to: | InfantryTypes |
This flag specifies the weapon that an infantry with Occupier=yes should fire when occupying a building with CanBeOccupied=yes and MaxNumberOccupants set to a positive integer greater than 0.
If the infantry's veterancy status is "elite", it will instead use the weapon specified by EliteOccupyWeapon.
The range of any weapon fired by an occupant is overridden by [CombatDamage]→OccupyWeaponRange. Those weapons also get additional multiplers to Damage and ROF specified by [CombatDamage]→OccupyDamageMultiplier and [CombatDamage]→OccupyROFMultiplier, respectively.
If a weapon fired by an occupant has OccupantAnim set to any valid animation, it will be displayed when the weapon is fired accordingly.
Automatic List Inclusion
Weapons used as values for this flag are automatically listed under the internal [Weapons] array. However no harm can be done by listing them manually.
Different implementation for Red Alert 2
For Red Alert 2 without the Yuri's Revenge expansion, which weapon each occupant fires is instead determined by the building itself. Primary is used by a player controlling any country listed under [Sides]→GDI1; Secondary for [Sides]→Nod1.
Interestingly, this akward implementation allows infantry to fire different weapons depending on the building they are occupying.
Those buildings will ignore the tag LandTargeting and NavalTargeting.
See also
Notes
1 ↑ Note that "GDI" and "Nod" are residual from the Tiberian Sun engine and are treated as the Allied and Soviet sides respectively in Red Alert 2.