object - commandobject - platoon
unit FindClosestEnemyEx(int nUnit, int nTargetType)
Scope: private
Parameters
nUnit - unit number
nTargetType - combination of following values:
findTargetWaterUnit - ship,
findTargetFlyingUnit - flying unit,
findTargetNormalUnit - land unit,
findTargetBuildingUnit - building,
findTargetAnyUnit - any of aboves,
findTargetWall - wall ED or UCS,
findTargetBuildingRuin - building ruin.
Return values
Found unit or null if not found.
Description
This function searches for the closest enemy object of type nTargetType in range of
view.
See also