From Savage Game Design Wiki
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): unknown


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


[groupsAndUnits, centre, radius, any, distance3D] call VN_ms_fnc_isNear
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: Number - (Optional, default 15) distance to check
any: Boolean - (Optional, default false) check if any unit is close
distance3D: Boolean - (Optional, default false) is the check done in 3D distance
Return value
Boolean - are all (or any) provided units inside given radius from given centre


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