nearestObject: Difference between revisions

From Bohemia Interactive Community
mNo edit summary
mNo edit summary
Line 17: Line 17:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>_nObject = nearestObject [ [[player]], "StreetLamp"]  
|x1= <code>_nObject <nowiki>=</nowiki> nearestObject <nowiki>[</nowiki>[[player]], "StreetLamp"] </code> |= Example 1
Comments This command can only find objects up to 50 meters away.</pre> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 29: Line 28:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
 
This command can only find objects up to 50 meters away.
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 01:26, 4 August 2006

Hover & click on the images for description

Description

Description:
Nearest object of given type to given position. For nearestObject pos, pos may be [x, y ,z, "type"] or [object, "type"] or even [x, y, z].
Groups:
Uncategorised

Syntax

Syntax:
nearestObject pos
Parameters:
pos: Array
Return Value:
Object

Examples

Example 1:
_nObject = nearestObject [player, "StreetLamp"]

Additional Information

See also:
See also needed

Notes

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

Notes

This command can only find objects up to 50 meters away.

Bottom Section