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

GuardRange

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: GuardRange
File(s): rules(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: Range of the unit's current primary weapon
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes



Specifies the range, in cells, that this unit will scan for targets to attack.

As a special case, GuardRange is also used to determine the 'auto-fill' wall placement distance; the number of cells between which a new wall can be connected to an existing wall (assuming there are no obstructions).

Notes

If the GuardRange is greater than the weapon's Range, the unit will attempt to target enemies outside its firing range. However, due to insufficient range, it cannot fire and remains in a perpetual targeting state. In this scenario, you need to add DefaultToGuardArea=yes to make it approach the target.

If the default rules are used instead of manually specifying this flag, the unit's target acquisition will consider whether the weapon can actually fire at the target.

  • For example, if the current primary weapon has [Projectiles]SubjectToWalls=yes,
    • Under default conditions the target acquisition mechanism will ignore targets blocked by OverlayTypes with Wall=yes.
    • However, if the GuardRange is set to the same range as the [Weapons]Range=, the unit will consider targets behind walls and choose to move around the cover obstruction to initiate attacks.