Search the Community
Showing results for tags 'bis_fnc_randompos'.
Found 2 results
-
Array in blacklist of BIS_fnc_randomPos
MiB_rus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to use array in blacklist of BIS_fnc_randomPos. In array all Towns of map. My task: to make spawn everywhere, except for the area of cities. towns = (nearestLocations [[worldSize / 2, worldsize / 2, 0], ["NameCity", "NameVillage", "NameCityCapital"], worldSize]); townsPosSize = []; { townsPosSize pushBack [(locationPosition _x select 0), (locationPosition _x select 1), ((size _x) select 0)*3]; _name = format["mrk_%1", text _x]; _foo = createmarker [_name, [locationPosition _x select 0, locationPosition _x select 1]]; _foo setMarkerSize [((size _x) select 0)*3, ((size _x) select 0)*3]; _foo setMarkerShape "ELLIPSE"; _foo setMarkerBrush "SOLID"; _foo setMarkerColor "ColorRed"; } forEach towns; //test for "_i" from 1 To 200 do { _newPosTest = [nil, [townsPosSize,"water", [getPos player, 600]]] call BIS_fnc_randomPos; _nameT = format["mrk_%1", _i]; _fooT = createmarker [_nameT, _newPosTest]; _fooT setMarkerType "hd_dot"; _fooT setMarkerColor "ColorGreen"; }; But the function BIS_fnc_randomPos ignores this (area of cities). I also tried _newPosTest = [nil, [towns,"water"]] call BIS_fnc_randomPos; But the result is the same. "water" - works, towns - not works. -
Hi, I'm new to scripting so forgive me for what I'm asking. I'm trying to make a training mission for my clan. I need to randomly place four flags inside a given area defined by a marker, and these four flags have some constraints in terms of the position in which they can be placed. Here's a bit of the code: traguardo setPos ([["white"], []] call BIS_fnc_randomPos); blueflag setPos ([[[getPos traguardo, 4500]], [[getPos traguardo, 2500], "water"], _this inArea "white"] call BIS_fnc_randomPos); where "white" is the name of the above-stated marker. When I run the code, it returns me the error: |#|_this inArea "white" Error undefined variable in the expression: _this don't know why though. Thank you greatly for your help.