Sarge-AI/scripts/UPSMON/COMMON/Group/fnc/UPSMON_getunits.sqf
Teh Dango 3ac749d64b 2.1.0
This is the latest stable version of Sarge AI for Arma 3: Exile.
2016-02-19 21:49:51 -05:00

41 lines
685 B
Plaintext

/****************************************************************
File: UPSMON_getunits.sqf
Author: Azroul13
Description:
Parameter(s):
<--- Array of units
Returns:
Array of units
****************************************************************/
private ["_units","_validunits"];
_units = _this select 0;
_validunits = [];
{
if (alive _x) then
{
If (vehicle _x == _x) then
{
If (_x getvariable ["UPSMON_Supstatus",""] != "SUPRESSED") then
{
If (canmove _x) then
{
If (canstand _x) then
{
If (!([_x] call UPSMON_Inbuilding)) then
{
_validunits pushback _x;
};
};
};
};
};
};
}foreach _units;
_validunits