mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
35 lines
722 B
Plaintext
35 lines
722 B
Plaintext
|
/****************************************************************
|
||
|
File: UPSMON_Checkfreebldpos.sqf
|
||
|
Author: Azroul13
|
||
|
|
||
|
Description:
|
||
|
Filter the building position and check if there're no unit near the position.
|
||
|
|
||
|
Parameter(s):
|
||
|
<--- Building positions
|
||
|
Returns:
|
||
|
Building position
|
||
|
****************************************************************/
|
||
|
|
||
|
private ["_bldpos","_altura","_unitnear","_id"];
|
||
|
|
||
|
_bldpos = _this select 0;
|
||
|
_unitnear = [];
|
||
|
_altura = [];
|
||
|
_id = -1;
|
||
|
{
|
||
|
_id = _id + 1;
|
||
|
If (typename _x == "ARRAY") then
|
||
|
{
|
||
|
If (count _x > 0) then
|
||
|
{
|
||
|
_unitnear = _x nearEntities [["CAManBase","STATICWEAPON"],0.5];
|
||
|
If (count _unitnear == 0) exitwith
|
||
|
{
|
||
|
_altura = [_x,_id]
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
} foreach _bldpos;
|
||
|
|
||
|
_altura;
|