Search the Community
Showing results for tags 'safepos'.
Found 1 result
-
Error with BIS_fnc_findSafePos after a BIS_fnc_randomPos pos.
LSValmont posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am getting this error when using BIS_fnc_findSafePos after getting a position from BIS_fnc_randomPos. This is the script that generates that error: _FirstPos = [] call BIS_fnc_randomPos; _Residential_Area = nearestLocations [_FirstPos, ["NameCity","NameCityCapital","NameVillage"], worldSize]; _Residential_Position = position (_Residential_Area select (floor (random (count _Residential_Area)))); _Rdm_Pos = [[[_Residential_Position, random 1]],["water"]] call BIS_fnc_randomPos; _Safe_Pos = [_Rdm_Pos, 0, 100, 10, 0, 0.1, 0] call BIS_fnc_findSafePos; _pos = _Safe_Pos; _pos This however works without any errors: _FirstPos = [] call BIS_fnc_randomPos; _Residential_Area = nearestLocations [_FirstPos, ["NameCity","NameCityCapital","NameVillage"], worldSize]; _Residential_Position = position (_Residential_Area select (floor (random (count _Residential_Area)))); _Rdm_Pos = [[[_Residential_Position, random 1]],["water"]] call BIS_fnc_randomPos; _pos = _Rdm_Pos; _pos //this works without errors and gives me a position value just fine So the error only happens when I take the position generated by _Rnd_Pos (BIS_fnc_randomPos) and use it inside _Safe_Pos (BIS_fnc_findSafePos). Any ideas why this is happening and how to fix it? Thanks!