CBA_fnc_getNearest

Description

A function used to find out the nearest entity parsed in an array to a position.  Compares the distance between entity’s in the parsed array.

Parameters

_positionMarker, Object, Location, Group or Position
_arrayArray of [Marker, Object, Location, Group and or Positions]
_radiusMaximum distance from _position
_codeCondition to meet (Code)

Example

_nearestVeh = [player, vehicles] call CBA_fnc_getNearest
_nearestGroups = [[0,0,0], allGroups, 50, {count (units _x) > 1}] call CBA_fnc_getNearest

Returns

Nearest given entity or List of entities within given distance

Author

Rommel

Close