nearTargets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(elements offsets)
(add. classification)
Line 49: Line 49:
[[Category:Scripting Commands ArmA|NEARTARGETS]]
[[Category:Scripting Commands ArmA|NEARTARGETS]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Revision as of 01:31, 2 December 2009

-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:
See also needed

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

Bottom Section