Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:Finds objects within the given radius.

Note: The first object in the returned array is not necessarily the closest one (like it is in nearestObjects, for example).

Syntax

Syntax:position nearObjects radius
Parameters:
  • position: Position-2 - Position around which to check.
  • radius: Number - Radius to check.
Return Value:Array of Object - Nearby objects.

Alternative Syntax

Syntax:position nearObjects [typeName, radius]
Parameters:
  • position: Position-2 - Position around which to check.
  • typeName: String - If specified, only objects of the given type (or its subtype) are listed.
  • radius: Number - Radius to check.
Return Value:Array of Object - Nearby objects.

Examples

Examples:

_list = position player nearObjects 50

_list= [_xpos,_ypos] nearObjects ["House",20]

Additional Information

See also: nearestObject, nearestObjects, nearObjectsReady, nearEntities
Multiplayer:
Problems:

Notes






  • Units in vehicles are not detected via this command. --Kronzky
  • To detect explosions and smoke grenades, use "#explosion" as the type. --Srlok