mrcurry
A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. Any unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1.
Results appear below as you type; use the arrow keys to move through them.
Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
unit nearTargets range
Parameters:
Returns: Array of Arrays in format [position, type, side, subjectiveCost, object, positionAccuracy]:
player nearTargets 100;
// can return e.g
/*
[
[[2555.33,2535.33,1.32708],"SoldierEB",EAST,214222,EAST 1-1-A:1],
[[2550.39,2482.5,1.32696],"SoldierWB",WEST,0,WEST 1-1-A:2]
]
*/
targets · targetsQuery · targetsAggregate · targetKnowledge · knowsAbout · reveal · forgetTarget · setTargetAge · getHideFrom · findNearestEnemy · nearestBuilding · nearestObject · nearestObjects · nearObjects · nearestLocation · nearEntities · nearSupplies · nearestLocationWithDubbing · nearObjectsReady · nearRoads · nearestMines
A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. Any unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1.
The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit:
The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
0 class CAManBase : Man
1.6 class SoldierWB : CAManBase
2 class USMC_Soldier_Base : SoldierWB
3.9 class USMC_Soldier : USMC_Soldier_Base
For tanks:
The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
Position accuracy seems to be a radius in meters from the perceived position.