Sarge-AI/scripts/UPSMON/COMMON/unit/fnc/UPSMON_DeployStatic.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

42 lines
905 B
Plaintext

/****************************************************************
File: UPSMON_DeployStatic.sqf
Author: Azroul13
Description:
Check before deploying the static
Parameter(s):
Returns:
****************************************************************/
private ["_grp","_currpos","_attackpos","_checkforstatic","_staticteam","_insideveh"];
_grp = _this select 0;
_currpos = _this select 1;
_attackpos = _this select 2;
_checkforstatic = [_grp] call UPSMON_GetStaticTeam;
_staticteam = _checkforstatic select 0;
_weapon = _checkforstatic select 1;
if (count _staticteam == 2) then
{
_insideveh = false;
{
If (alive _x) exitwith
{
If (vehicle _x != _x) then
{
If (!_insideveh) then
{
_insideveh = true
};
};
};
} foreach _staticteam;
If (!_insideveh) then
{
[_staticteam select 0,_staticteam select 1,_currpos,_attackpos,_weapon] spawn UPSMON_Unpackbag;
};
};