In Area All - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the in Area All function.
/*
* Author: Mike
* Checks if all units of an array are in a specific area, same logic as inArea function just checking for any units outside of an area.
*
* Can be called anywhere.
*
* Arguments
* 0: Unit Array <ARRAY>
* 1: Marker <MARKER>
*
* Return Value:
* BOOL
*
* Example:
* [[myGuy, myOtherGuy], "MyMarker"] call MFUNC(inAreaAll)
*/This function is primarily designed for Per frame handler style triggers, checking if ALL provided units are within a marker radius, works the same as the inArea function.
Example:
[{
params ["_args", "_handle"];
_args params [["_A", false]];
private _players = [true] call MFUNC(players);
if (!_A) then {
if ([_players, "MyMarker"] call MFUNC(inAreaAll)) then {
_args set [0, true];
};
};
}, 3] call CBA_fnc_addPerFrameHandler;