nearObjects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(formatting)
Line 16: Line 16:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Array]] <nowiki>=</nowiki> position '''nearObjects''' radius ''or'' [typeName, radius]
| position '''nearObjects''' radius ''or'' [typeName, radius]


|p1= position: [[Array]] |= Parameter 1
|p1= position: [[Array]] - format [[Position]] |= Parameter 1
|p2= [typeName, radius]: [[Array]] |= Parameter 2
|p2= [typeName, radius]: [[Array]] |= Parameter 2
|p3= typeName: [[String]] |= Parameter 3
|p3= typeName: [[String]] |= Parameter 3
Line 40: Line 40:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
*Units in vehicles are not detected via this command. --[[User:Kronzky|Kronzky]]
<dd class="notedate">Posted on June 30, 2007 - 08:21
*You can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use "All" as an alternative to leaving it out. (CO 1.59) --[[User:Tankbuster|Tankbuster]]
<dt class="note">'''[[User:Kronzky|Kronzky]]'''<dd class="note">
Units in vehicles are not detected via this command.
<dd class="notedate">Posted on December 15, 2011 - 23:17
<dt class="note">'''[[User:Tankbuster|Tankbuster]]'''<dd class="note">
You can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use "All" as an alternative to leaving it out. (CO 1.59)
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 02:26, 16 December 2011


-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Find objects in the circle with given radius.
If typeName is given, only objects of given type (or its subtype) are listed.
The first object in the returned array is not necessarily the closest one (like it is in nearestObjects for example).
Groups:
Uncategorised

Syntax

Syntax:
position nearObjects radius or [typeName, radius]
Parameters:
position: Array - format Position
[typeName, radius]: Array
typeName: String
radius: Number
Return Value:
Array

Examples

Example 1:
_list = position player nearObjects 50
Example 2:
_list= [_xpos,_ypos] nearObjects ["House",20]

Additional Information

See also:
nearestObjectnearestObjectsnearObjectsReadynearEntities

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 June 30, 2007 - 08:21
Kronzky
Units in vehicles are not detected via this command.
Posted on December 15, 2011 - 23:17
Tankbuster
You can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use "All" as an alternative to leaving it out. (CO 1.59)

Bottom Section