nearTargets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Nested [[Array]] <nowiki>=</nowiki> [[Object#Unit|Unit]] '''nearTargets''' range |= Syntax
| [[Array]] <nowiki>=</nowiki> unit '''nearTargets''' range |= Syntax


|p1= range: [[Number]]|= Parameter 1
|p1= unit: [[Object]]|= Parameter 1
|p2= range: [[Number]]|= Parameter 2


| Nested [[Array]], consisting of:
| Nested [[Array]], consisting of:
*position (perceived, includes judgment errors and memory),
*Position (perceived, includes judgment and memory errors),
*type (perceived, gives only what was recognized),
*Type (perceived, gives only what was recognized),
*side (again, perceived side),
*Side (perceived side),
*subjective cost (positive for enemies, more positive for more important or more dangerous  
*Subjective Cost (positive for enemies, more positive for more important or more dangerous  
enemies),
enemies),
*object (what object, can be used to get more information if needed)
*Object (object type, can be used to get more information if needed)
*(since build 5209:) position accuracy (assumed accuracy of the perceived position)
*(since build 5209:) position accuracy (assumed accuracy of the perceived position)
''for each recognized target''|= Return value
 
'''for each recognized target'''|= Return value


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 23:14, 23 January 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:
  • Position (perceived, includes judgment and memory errors),
  • Type (perceived, gives only what was recognized),
  • Side (perceived side),
  • Subjective Cost (positive for enemies, more positive for more important or more dangerous
enemies),
  • Object (object type, can be used to get more information if needed)
  • (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