nearObjects: Difference between revisions
Jump to navigation
Jump to search
m (rm. off-topic example) |
mNo edit summary |
||
Line 16: | Line 16: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[Array]] <nowiki>=</nowiki> position '''nearObjects''' radius ''or'' [typeName, radius] | ||
|p1= typeName: [[ | |p1= position: [[Array]] |= Parameter 1 | ||
| | |p2= [typeName, radius]: [[Array]] |= Parameter 2 | ||
|p3= typeName: [[String]] |= Parameter 3 | |||
|p4= radius: [[Number]] |= Parameter 4 | |||
| [[Array]] |= Return value | | [[Array]] |= Return value | ||
__________________________________________________________________________________________ | |||
|x1= <code>_list <nowiki>=</nowiki> [[position]] [[player]] '''nearObjects''' 50</code> |= Example 1 | |x1= <code>_list <nowiki>=</nowiki> [[position]] [[player]] '''nearObjects''' 50</code> |= Example 1 |
Revision as of 22:05, 23 January 2009
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:
- Array = position nearObjects radius or [typeName, radius]
- Parameters:
- position: Array
- [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
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
- Units in vehicles are not detected via this command. --Kronzky