nearTargets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(populated)
mNo edit summary
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns a list of targets within the defined range. |= Description
| Returns a list of targets within the defined range.<br>
"Targets" are not restricted to enemy units. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 15: Line 16:
|p2= range: [[Number]]|= Parameter 2
|p2= range: [[Number]]|= Parameter 2


| [[Array]], consisting of:<br>
| Nested [[Array]], consisting of:<br>
position (perceived, includes judgement errors and memory),<br>
position (perceived, includes judgement errors and memory),<br>
type (perceived, gives only what was recognized),<br>
type (perceived, gives only what was recognized),<br>
Line 21: Line 22:
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),<br>
enemies),<br>
object (what object, can be used to get more information if needed) |= Return value
object (what object, can be used to get more information if needed)<br>
''for each recognized target''|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= player nearTargets 100 |= Example 1
|x1= <code>player nearTargets 100 </code>could return something like this: <br>
<nowiki>[[[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]]</nowiki>|= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 16:56, 17 May 2007

-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:
unit nearTargets range
Parameters:
unit: object
range: Number
Return Value:
Nested Array, consisting of:
position (perceived, includes judgement errors and memory),
type (perceived, gives only what was recognized),
side (again, percieved side),
subjective cost (positive for enemies, more positive for more important or more dangerous enemies),
object (what object, can be used to get more information if needed)
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