nearObjects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 19: Line 19:
*[[Array]] <nowiki>=</nowiki> [[Position]] '''nearObjects''' radius  
*[[Array]] <nowiki>=</nowiki> [[Position]] '''nearObjects''' radius  
*[[Array]] <nowiki>=</nowiki> [[Object]] '''nearObjects''' radius  
*[[Array]] <nowiki>=</nowiki> [[Object]] '''nearObjects''' radius  
|p1= radius: [[Number]]
*[[Array]] <nowiki>=</nowiki> [[Position]] '''nearObjects''' ["typeName", radius]
*[[Array]] <nowiki>=</nowiki> [[Object]] '''nearObjects''' ["typeName", radius]
 
|p1= typeName: [[String]] as per [[CfgVehicles]]
|p2= radius: [[Number]]


| [[Array]] |= Return value
| [[Array]] |= Return value


____________________________________________________________________________________________
|s2=
*[[Array]] <nowiki>=</nowiki> [[Position]]'''nearObjects''' ["typeName", radius] |= Syntax
*[[Array]] <nowiki>=</nowiki> [[Object]]'''nearObjects''' ["typeName", radius] |= Syntax
|p21= typeName: [[String]] as per [[CfgVehicles]]
|p22= radius: [[Number]]


|r2= [[Array]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   

Revision as of 11:02, 28 August 2007


-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:
Parameters:
typeName: String as per CfgVehicles
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:
nearestObjectnearestObjectsnearestObject typenearestObject id

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.

Bottom Section