nearTargets

From Bohemia Interactive Community
Revision as of 18:51, 15 January 2012 by .kju (talk | contribs)
Jump to navigation Jump to search
-wrong parameter ("Arma") defined!-1.07
Hover & click on the images for description

Description

Description:
Returns a list of targets within the defined range.
"Targets" are not restricted to enemy units.
Groups:
Uncategorised

Syntax

Syntax:
Array = unit nearTargets range
Parameters:
unit: Object
range: Number
Return Value:
Nested Array, consisting of:
  • 0: Position (perceived, includes judgment and memory errors),
  • 1: Type (perceived, gives only what was recognized),
  • 2: Side (perceived side),
  • 3: Subjective Cost (positive for enemies, more positive for more important or more dangerous
enemies),
  • 4: Object (object type, can be used to get more information if needed)
  • 5: (since build 5209:) position accuracy (assumed accuracy of the perceived position)
for each recognized target

Examples

Example 1:
player nearTargets 100 could return something like this:
[[[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]]

Additional Information

See also:
revealknowsAbout

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on Febuary 17, 2011
Curry
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.
Posted on January 15, 2012
kju
The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit: For infantry: ] 0 , 1.5 [ - side unknown, some position offset, identified as SoldierWB [ 1.5, 1.6 [ - side identified, subjective cost set [ 1.6, 2 [ - type identified better (USMC_Soldier_Base) [ 2 , 3.6 [ - type identified precisely (USMC_Soldier) [ 3.6, 4 ] - position identified precisely 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

Bottom Section