nearObjects: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 51: | Line 51: | ||
*Units in vehicles are not detected via this command. --[[User:Kronzky|Kronzky]] | *Units in vehicles are not detected via this command. --[[User:Kronzky|Kronzky]] | ||
{_x setdamage 1} foreach (player nearObjects 50); Will only destroy Buildings. Trees and Fences/Walls will remain intact. | *{_x setdamage 1} foreach (player nearObjects 50); Will only destroy Buildings. Trees and Fences/Walls will remain intact. | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> |
Revision as of 12:15, 26 August 2007
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
- Parameters:
- position: Object or Array
- radius: Number
- Return Value:
- Array
Alternative Syntax
- Syntax:
- position nearObjects [typeName, radius]
- Parameters:
- position: Object or Array
- [typeName, radius]: Array
- 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
- {_x setdamage 1} foreach (player nearObjects 50); Will only destroy Buildings. Trees and Fences/Walls will remain intact.