I have made a trigger which call on activation, some script which spawns zeds.
I use BIS_fnc_findsafePos to choose a position of where to spawn each zed
But I need to make some zones where zeds will not be spawned, some kind of exceptions.
P.S.: there are some reasons I can not use some kind of zed nuker script which will despawn zeds if they spawned n safe area, so the only way is to prevent spawning in this areas.
Made some code:
But this breaks the script, nothing is spawning =(
Tried to use it without block of checking if _posit is in safePositions all worked fine.
I use BIS_fnc_findsafePos to choose a position of where to spawn each zed
But I need to make some zones where zeds will not be spawned, some kind of exceptions.
P.S.: there are some reasons I can not use some kind of zed nuker script which will despawn zeds if they spawned n safe area, so the only way is to prevent spawning in this areas.
Made some code:
Code:
for "_i" from 1 to _qty do {
_posit = [_position, 0, _radius, 10, 0, 2000, 0] call BIS_fnc_findSafePos;
{
_distance = (_x select 0) distance _posit;
if (_distance < (_x select 1)) exitWith {_safePos = true;};
} forEach safePositions;
if (_safePos) then {
_qty = _qty + 1;
} else {
_agent = createagent [_type, _posit, [], 0, "NONE"];
};
};
Code:
safePositions = [
[[4880.2402, 9699.0859, 0], 50],
[[4714.9839, 9957.9658, 0], 50]
];
But this breaks the script, nothing is spawning =(
Tried to use it without block of checking if _posit is in safePositions all worked fine.