Sarge-AI/scripts/UPSMON/MODULES/ARTILLERY/fnc/UPSMON_Splashzone.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

36 lines
746 B
Plaintext

/****************************************************************
File: UPSMON_Splashzone.sqf
Author: Azroul13
Description:
check if there's allied near the targetpos.
Parameter(s):
<--- Arti unit
<--- Mission fire
Returns:
boolean
****************************************************************/
private [];
_targetPos = _this select 0;
_munradius = _this select 1;
_side = _this select 2;
_result = false;
//Must check if no friendly squad near fire position
{
If (!IsNull _x) then
{
if (alive (leader _x)) then
{
If (_side == side _x) then
{
if ((round([getposATL (leader _x),_targetPos] call UPSMON_distancePosSqr)) <= (_munradius)) exitwith {_result = true;_result};
};
};
};
} foreach UPSMON_NPCs;
_result