Skip to content
VN_ms_fnc_isNear

VN_ms_fnc_isNear

Checks if most (> 50%) or any (at least 1) of the units are inside a given radius from a given object/position.

Syntax

[groupsAndUnits, centre, radius, any, distance3D] call VN_ms_fnc_isNear

Parameters

ParameterTypeDefaultDescription
groupsAndUnits Object, Group, Array of Object and/or Group— array of groups and/or units
centre Array format Position or Object— the expected destination
radius Number15 distance to check
any Booleanfalse check if any unit is close
distance3D Booleanfalse is the check done in 3D distance

Return value

Boolean - are all (or any) provided units inside given radius from given centre

Examples

[[player, groupBravo], getMarkerPos "destination", 5, true, true] call VN_ms_fnc_isNear;

Documented by Wyqer, veteran29.