exceptions while using BIS_fnc_findSafePos

ka3ant1p

Member
Trying to make some exceptions when using BIS_fnc_findSafePos, but script doesn't work =(

Code:
private ["_triger","_position","_type","_safePos","_distance","_safePositions"];
_triger = _this select 0;
titleText ["Starting the script", "PLAIN DOWN", 1];

_safePositions = [
[4880.2402, 9699.0859]
];


for "_i" from 1 to 10 do {
_position = [(getPosATL _triger), 0, 20, 10, 0, 2000, 0] call BIS_fnc_findSafePos;
titleText ["Got position", "PLAIN DOWN", 1];

{_distance = [(_x select 0),(_x select 1),0] distance _position;
titleText ["distanse measured", "PLAIN DOWN", 1];
if (_distance < 10) exitWith {_safePos = true; titleText ["Position got in safepos", "PLAIN DOWN", 1];};
} forEach _safePositions;

titleText ["check started", "PLAIN DOWN", 1];
if (_safePos) then {
titleText ["safepos - true", "PLAIN DOWN", 1];
} else {
titleText ["safepos - false", "PLAIN DOWN", 1];
};
};
I always get message "check started"
I also tried to make check if (!_safePos) but I result is the same

tried to add some text after "if (_safePos) then { } else { };" block, and i see those text, so for some reason script just miss the block with this check.
Help please to adjust it.
 
Back
Top