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

20 lines
317 B
Plaintext

private ["_npc","_enies","_nbr","_unitsnear"];
_npc = _this select 0;
_enies = _this select 1;
_enies = _enies - _npc;
_unitsnear = nearestobjects [getposATL _npc,["CAManBase","TANK","CAR"],100];
_nbr = 0;
{
If (alive _x) then
{
If (_x in _enies) then
{
_nbr = _nbr +1;
};
}
} foreach _unitsnear;
_nbr