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

CanApproachTarget

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: CanApproachTarget
File(s): rules(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: yes
Applicable to: InfantryTypes, VehicleTypes, AircraftTypes


Controls whether the unit keeps approaching a target it has already acquired once that target drifts out of weapon range - i.e. whether it closes the distance to an out-of-range target during the pursuit flow, rather than stopping and waiting for the target to come back into range.

It governs "approach": once the unit is actually in the pursuit flow and its target is out of range, it either moves in to fight (true) or stops and waits (false).

Notes

Note that guarding (Guard / Area Guard) units do not chase out-of-range targets at all - that is a property of the guard mission itself, independent of this flag; this flag only has a say once the unit is moving to engage.

It only matters while the target is out of weapon range; once the target is in range the unit fires directly and this flag plays no part.

Setting it to false does not leave the unit idle: it still locks on and fires the moment the target enters range — it just does not move. Turning to aim is a separate behaviour governed by Turret, not by this flag.

When the unit's current mission is Attack, or it is switched into Attack by retaliation, it still pursues and this flag is ignored.

The vanilla Mirage Tank ships with CanApproachTarget=no, paired with DisguiseWhenStill=yes. Guarding keeps it stationary by design, so its tree disguise is never given away by movement or turning; per the previous note, an explicit attack order still makes it chase.

Setting false on AA units stops them from closing on air units during pursuit; they hold position and fire only at aircraft entering range, and only give chase when attacked (which puts them into the attack mission, where this flag is ignored).

Bugs/Side-Effects/Unexpected Limitations

It increases kiting risk: if the enemy outranges the unit, a false unit cannot reach and will not chase, so it may be whittled down at range.

It does not stop turning/aiming: false only stops approach movement. Whether a guarding unit turns to face an out-of-range target is decided by Turret - with Turret=yes (the default) the turret swings toward the target on its own (body stays put); with Turret=no the body does not turn at all unless it is already facing the target, because the game only maintains an already-aligned facing. The vanilla Mirage Tank combines CanApproachTarget=no with Turret=no precisely so guarding never reveals its disguise through movement or turning.

See Also