Arma 3
Dynamic Recon Ops - Lingor
Havok 26 Aug, 2016 @ 7:03am
Re: boat placement
Not sure if this helps, but regarding the boat placement someone mentioned in the comments; I just used and modified some functions from the tutorials in Zen's framework, and although it's far from perfect, I made something like this:

// create boat [_randomStartingLocation] spawn { _cityCenter = _this select 0; _areaSize = 200; _positionArray = [_cityCenter, _areaSize] call f_getnearbyPositions16; _markerArray = [_positionArray, _areaSize] call f_createMarkersfromArray; _markerArray = [_markerArray] call f_filterMarkersForBoat; if (count _markerArray > 0) then { _randomArea = [_markerArray] call Zen_ArrayGetRandom; _boatPosition = [_randomArea, [0, 200], [], 2, 0, [0,360], 0, 0, 100, 0, 0, 0, 0] call Zen_FindGroundPosition; _boatMarker = [_boatPosition, "Boat"] call Zen_SpawnMarker; _boat = [_boatPosition, "B_T_Boat_Transport_01_F"] call Zen_SpawnVehicle; player sidechat "Boat placed"; }; };

and..

f_filterMarkersForBoat = { private ["_parmarray", "_pmarkerarray", "_terrainExtent"]; // Assign to local variable the function argument _parmarray = _this select 0; _pmarkerarray = +_parmarray; // Filter a copy of the array argument // Iterate across array of positions // If the position is mostly water then replace it in the array with the value '0' { _terrainExtent = [_x] call Zen_IsWaterArea; if (_terrainExtent < 0.3) then { _pmarkerarray set [_forEachIndex,0]; }; if (_terrainExtent > 0.8) then { _pmarkerarray set [_forEachIndex,0]; }; } forEach _pmarkerarray; // Remove all elements of position array that have value of '0' [_pmarkerarray,0] call Zen_ArrayRemoveValue; private ["_alphaValue"]; // Debug _alphaValue = 0; // Debug { _x setMarkerAlpha 1; // Debug if ((_alphaValue mod 2) == 0) then {_x setMarkerColor "ColorOrange"}; // Debug _alphaValue = _alphaValue+1; // Debug } forEach _pmarkerarray; // Debug // Return filtered array of area markets to the calling function _pmarkerarray };

I've omitted the functions that I didn't change - they can be found in Zen's framework tutotials.
< >
Showing 1-1 of 1 comments
Havok 26 Aug, 2016 @ 7:06am 
Basically,
_boatPosition = [_randomArea, [0, 200], [], 2, 0, [0,360], 0, 0, 100, 0, 0, 0, 0] call Zen_FindGroundPosition;

and

{ _terrainExtent = [_x] call Zen_IsWaterArea; if (_terrainExtent < 0.3) then { _pmarkerarray set [_forEachIndex,0]; }; if (_terrainExtent > 0.8) then { _pmarkerarray set [_forEachIndex,0]; }; } forEach _pmarkerarray;

are the interesting parts.
< >
Showing 1-1 of 1 comments
Per page: 1530 50