Jump to content

FederalRazer89

Member
  • Content Count

    84
  • Joined

  • Last visited

  • Medals

Everything posted by FederalRazer89

  1. Hello As the title might suggest, i am trying to find a elevated position near the objectiv. I am creating a function that will place waypoint the highest point close to the objectiv, so that i can have AI sniper group/ recon group overwatch on higher ground. The way i intended to do it was to get some locations around the position, but i dont know how i would sort the array by height. The script: _reconSort = []; for "_i" from 1 to 360 do { _testpos = [_pos, random [100,200,500], _i] call BIS_fnc_relPos; _reconSort pushBack _testpos; }; _reconSort apply {[_x distance _grp, _x] }; Any help would be appreciated.
  2. My function work with out any problem, its just that when i tried to add your function to get a position on the location on the objectiv it does nothing. Not a singel error is shown or disrupted any of the script, so i not sure what to look for. But i will test some more and se if i can get it to work.
  3. The _pos is just the group leaders position, but the varible _pos gets new coordinates from the fn_waitpointGenerating function. I have done several test with the fn_waitpointGenerating function and i know that it will give a new position, but i can show you the function. The function is about 100 lines long so i cut out some of the code. fn_Waypointgenerating = { _pos = _this select 0; _grp = _this select 1; _mode = _this select 2; _side = _this select 3; _MatMRK1 = getMarkerPos "MaterialsiteMRK1"; _MatMRK2 = getMarkerPos "MaterialsiteMRK2"; --------------------Several markers ------------------------- _FuelMRK6 = getMarkerPos "FuelsiteMRK6"; _chosePos = _pos; _AttackerArrayNato = []; _DefenderArrayNato = []; _AttackerArrayCSAT = []; _DefenderArrayCSAT = []; -------------------------Cut ----------------------------------------- if (_mode == 3) then { if (NATO_MaterialSite1 == 0) then {_AttackerArrayNato pushBack _MatMRK1};if (CSAT_MaterialSite1 == 1) then {_AttackerArrayNato pushBack _MatMRK1}; if (NATO_MaterialSite2 == 0) then {_AttackerArrayNato pushBack _MatMRK2};if (CSAT_MaterialSite2 == 1) then {_AttackerArrayNato pushBack _MatMRK2}; if (NATO_MaterialSite3 == 0) then {_AttackerArrayNato pushBack _MatMRK3};if (CSAT_MaterialSite3 == 1) then {_AttackerArrayNato pushBack _MatMRK3}; if (NATO_MaterialSite4 == 0) then {_AttackerArrayNato pushBack _MatMRK4};if (CSAT_MaterialSite4 == 1) then {_AttackerArrayNato pushBack _MatMRK4}; if (NATO_MaterialSite5 == 0) then {_AttackerArrayNato pushBack _MatMRK5};if (CSAT_MaterialSite5 == 1) then {_AttackerArrayNato pushBack _MatMRK5}; if (NATO_MaterialSite6 == 0) then {_AttackerArrayNato pushBack _MatMRK6};if (CSAT_MaterialSite6 == 1) then {_AttackerArrayNato pushBack _MatMRK6}; if (NATO_MaterialSite7 == 0) then {_AttackerArrayNato pushBack _MatMRK7};if (CSAT_MaterialSite7 == 1) then {_AttackerArrayNato pushBack _MatMRK7}; if (NATO_MaterialSite8 == 0) then {_AttackerArrayNato pushBack _MatMRK8};if (CSAT_MaterialSite8 == 1) then {_AttackerArrayNato pushBack _MatMRK8}; if (NATO_MaterialSite9 == 0) then {_AttackerArrayNato pushBack _MatMRK9};if (CSAT_MaterialSite9 == 1) then {_AttackerArrayNato pushBack _MatMRK9}; if (NATO_MaterialSite10 == 0) then {_AttackerArrayNato pushBack _MatMRK10};if (CSAT_MaterialSite10 == 1) then {_AttackerArrayNato pushBack _MatMRK10}; if (NATO_FuelSite1 == 0) then {_AttackerArrayNato pushBack _FuelMRK1};if (CSAT_FuelSite1 == 1) then {_AttackerArrayNato pushBack _FuelMRK1}; if (NATO_FuelSite2 == 0) then {_AttackerArrayNato pushBack _FuelMRK2};if (CSAT_FuelSite2 == 1) then {_AttackerArrayNato pushBack _FuelMRK2}; if (NATO_FuelSite3 == 0) then {_AttackerArrayNato pushBack _FuelMRK3};if (CSAT_FuelSite3 == 1) then {_AttackerArrayNato pushBack _FuelMRK3}; if (NATO_FuelSite4 == 0) then {_AttackerArrayNato pushBack _FuelMRK4};if (CSAT_FuelSite4 == 1) then {_AttackerArrayNato pushBack _FuelMRK4}; if (NATO_FuelSite5 == 0) then {_AttackerArrayNato pushBack _FuelMRK5};if (CSAT_FuelSite5 == 1) then {_AttackerArrayNato pushBack _FuelMRK5}; if (NATO_FuelSite6 == 0) then {_AttackerArrayNato pushBack _FuelMRK6};if (CSAT_FuelSite6 == 1) then {_AttackerArrayNato pushBack _FuelMRK6}; }; }; if (_side == west) then { if (_mode == 1) then { _AttackerArrayNato = _AttackerArrayNato apply {[_x distance _pos, _x] }; _AttackerArrayNato sort true; _chosePos = (_AttackerArrayNato select 0) select 1; }; if (_mode == 2) then { _DefenderArrayNato = _DefenderArrayNato apply {[_x distance _pos, _x] }; _DefenderArrayNato sort true; _chosePos = (_DefenderArrayNato select 0) select 1; }; if (_mode == 3) then { _AttackerArrayNato = _AttackerArrayNato apply {[_x distance _pos, _x] }; _AttackerArrayNato sort true; _chosePos = (_AttackerArrayNato select 0) select 1; }; }; _pos = _chosePos; };
  4. I tried to use findoverwatch and your script pierremgi but nether of them works as i want mabye there is some more i need to do. Only need to get a position that is the highest within 700m of the position. [_pos,_grp,_mode,_side] call fn_Waypointgenerating; <-------------------- Decide which objectiv to go to. sleep 1; [_pos,700] call MGI_HighestPt; _wp1 = _grp addWaypoint [_pos,30]; _wp2 = _grp addWaypoint [_pos,30]; _wp1 setWaypointType "SAD"; _wp2 setWaypointType "SAD"; };
  5. FederalRazer89

    any help with function for checking distance

    Thanks Grumpy Old Man that solved that problem. Now got another thing to solve, but i can fix on my own. I appreciat the help that i got thanks.
  6. Hello I dont really like to ask for help this often but i was about to test a way to approch another problem, that people of this forum have suggested some options that i will try. The problem is that i am trying to create a function that will check the distance to serveral positions, and if to close spawn a new position. I have done this kind of things more in a manual style with another script, but the amount of positions that i will create will need a lot writing of code that will be a bit cumbersome to work with. So a function that would handle that process would be nice. the script: fn_CheckDistanceToSites = { <----------------------------------------// function for checking distance to other positions _MainPos = _this select 0; _CompareArray = _this select 1; for "_i" from 0 to ((count _CompareArray) - 1) do { if ((_MainPos distance (_CompareArray select _i)) <= 500) exitWith {[_MainPos] call fn_findsettlement}; }; _MainPos = _this select 0; }; fn_findsettlement = { <----------------------------------------// function for creating a position near some buildings _housepos = _this select 0; _houselist = _this select 1; //Parameters _houseAmountCheck = 20; _checkradius = 100; _house = _houselist call BIS_fnc_selectRandom; _houseposList = nearestTerrainObjects [(getpos _house) ,["HOUSE","CHURCH","CHAPEL","FUELSTATION","HOSPITAL"], _checkradius,false]; _housepostest = _houseposList call BIS_fnc_selectRandom; if ((count _houseposList) <= _houseAmountCheck) then { _house = nil; _housepostest = nil; _house = _houselist call BIS_fnc_selectRandom; _houseposList = nearestTerrainObjects [(getpos _house) ,["HOUSE","CHURCH","CHAPEL","FUELSTATION","HOSPITAL"], _checkradius,false]; _housepostest = _houseposList call BIS_fnc_selectRandom; }; if ((count _houseposList) <= _houseAmountCheck) then { <--------------------------- // This command repeats for about 500 lines. _house = nil; _housepostest = nil; _house = _houselist call BIS_fnc_selectRandom; _houseposList = nearestTerrainObjects [(getpos _house) ,["HOUSE","CHURCH","CHAPEL","FUELSTATION","HOSPITAL"], _checkradius,false]; _housepostest = _houseposList call BIS_fnc_selectRandom; }; //The main code _houseposList = nearestTerrainObjects [_Center ,["HOUSE","CHURCH","CHAPEL","FUELSTATION","HOSPITAL"], _mapsize*2,false]; _Mat_pos1 = _houseposList call BIS_fnc_selectRandom; [_Mat_pos1,_houseposList] call fn_findsettlement; _Mat_pos2 = _houseposList call BIS_fnc_selectRandom; [_Mat_pos2,_houseposList] call fn_findsettlement; _matZoneArray1 = [_Mat_pos1]; [_Mat_pos2,_matZoneArray1] call fn_CheckDistanceToSites; _Mat_pos3 = _houseposList call BIS_fnc_selectRandom; [_Mat_pos3,_houseposList] call fn_findsettlement; _matZoneArray2 = [_Mat_pos1,_Mat_pos2]; [_Mat_pos3,_matZoneArray2] call fn_CheckDistanceToSites; The lines at the bottom are only 3 positions of 16 and when they are generated the script will create markers on those positions. I get the error undefined varible in _housepostest, but i have another mission that works fine with that function. I have been trying to solve this problem since i woke up so any help would be appreciated.
  7. FederalRazer89

    any help with function for checking distance

    I tried to use it this way, but because i am not really not sure of how the use "count" and "select" function work in the way you described Grumpy Old Man. I get an error that it wants a number but i produces a bool typ, any posibilty that you can exlain what i did wrong in my implementation? _Mat_pos3 = _houseposList call BIS_fnc_selectRandom; [_Mat_pos3,_houseposList] call fn_findsettlement; _matZoneArray2 = [_Mat_pos1,_Mat_pos2]; _tooClose1 = count (_matZoneArray1 select {_x distance2d _Mat_pos3 < 500} > 0); <---------------------------- Error here if (_tooclose ) then {[_Mat_pos3,_houseposList] call fn_findsettlement;};
  8. FederalRazer89

    any help with function for checking distance

    Will try and explain it in more detail. fn_findsettlement : Will try to find positions that have a certain amount of houses, and it will try about 40 locations (will rewrite this function later). fn_CheckDistanceToSites : This function is intended to check the distance of one position to an array of positions. If the position that is compared to the array is too close to any of the positions in the array it will use exitwith and start a new search for a new location with fn_findsettlement. The purpose of the script is to create randomly created positions and place markers on them. These markers will be used as a place to get resources. The amount of marker will be 16 at the moment and manually compare each resources site with each position would be cumbersome and easy to create unnecessary error when tweaking.
  9. FederalRazer89

    any help with function for checking distance

    This one is created on altis but i intend to make it work on any map so manuall placement of markers is something i want to avoid. And i would like to learn how to create a function that would be able to handle this kind of problem.
  10. Was working so didnt have time to test it, will try it this week. Have a lot of stuff that i need to test first, but thanks for the additional suggestions, will try those if BIS_fnc_findOverwatch dont work.
  11. Thanks for the respons, i will try the BIS_fnc_findOverwatch and if i can get it to work.
  12. Hello I am trying to place a marker on the boarder of the map, or close to it. At the moment i am using the command find the center of the map and then try to place it on the edge or a radius, with the map center as a referens point. That isnt so reliable and can cause marker to get placed to close to the players and make the vehicle despawns visible to the player. Would kind destroy the immersion. i found something in the CfgWorld called GRID, but i am not sure how to access it, so can test if i can use it. If anyone have a solution to this problem, then i would be happy, have search for means to place a marker on the map boarder for about a months.
  13. Just found the when i posted about getNumber(configFile >> "CfgWorlds" >> worldName >> "mapsize"); when i posted this. Now you saved me from doing the math behind it. Thanks Larrow
  14. Hello I am creating a script that will check several zones, and when diffrent side enter the triggered area the markers should change color. But because an unexpected error that say that ")" is missing, i cant proceed with the script. The line with the error is marked The script: _mainzone = getMarkerPos "marker1"; _zone2 = getMarkerPos "marker2"; _zone3 = getMarkerPos "marker3"; _zone4 = getMarkerPos "marker4"; _zone5 = getMarkerPos "marker5"; _zone6 = getMarkerPos "marker6"; //Friendly mainzonetrg = createTrigger ["EmptyDetector", _mainzone, true]; mainzonetrg setTriggerArea [500, 500, 0, false]; mainzonetrg setTriggerActivation ["WEST", "WEST D", true]; zone2trg = createTrigger ["EmptyDetector", _zone2, true]; zone2trg setTriggerArea [500, 500, 0, false]; zone2trg setTriggerActivation ["WEST", "WEST D", true]; zone3trg = createTrigger ["EmptyDetector", _zone3, true]; zone3trg setTriggerArea [500, 500, 0, false]; zone3trg setTriggerActivation ["WEST", "WEST D", true]; zone4trg = createTrigger ["EmptyDetector", _zone4, true]; zone4trg setTriggerArea [500, 500, 0, false]; zone4trg setTriggerActivation ["WEST", "WEST D", true]; zone5trg = createTrigger ["EmptyDetector", _zone5, true]; zone5trg setTriggerArea [500, 500, 0, false]; zone5trg setTriggerActivation ["WEST", "WEST D", true]; zone6trg = createTrigger ["EmptyDetector", _zone6, true]; zone6trg setTriggerArea [500, 500, 0, false]; zone6trg setTriggerActivation ["WEST", "WEST D", true]; //Enemy Emainzonetrg = createTrigger ["EmptyDetector", _mainzone, true]; Emainzonetrg setTriggerArea [500, 500, 0, false]; Emainzonetrg setTriggerActivation ["east", "east D", true]; Ezone2trg = createTrigger ["EmptyDetector", _zone2, true]; Ezone2trg setTriggerArea [500, 500, 0, false]; Ezone2trg setTriggerActivation ["east", "east D", true]; Ezone3trg = createTrigger ["EmptyDetector", _zone3, true]; Ezone3trg setTriggerArea [500, 500, 0, false]; Ezone3trg setTriggerActivation ["east", "east D", true]; Ezone4trg = createTrigger ["EmptyDetector", _zone4, true]; Ezone4trg setTriggerArea [500, 500, 0, false]; Ezone4trg setTriggerActivation ["east", "east D", true]; Ezone5trg = createTrigger ["EmptyDetector", _zone5, true]; Ezone5trg setTriggerArea [500, 500, 0, false]; Ezone5trg setTriggerActivation ["east", "east D", true]; Ezone6trg = createTrigger ["EmptyDetector", _zone6, true]; Ezone6trg setTriggerArea [500, 500, 0, false]; Ezone6trg setTriggerActivation ["east", "east D", true]; / /Check the Zone owners while {true} do{ FriendlyZoneCount = _Z2 + _Z3 + _Z4 + _Z5 + _Z6; mainzoneVal = _Fsum1 + _Esum1; zone2Val = _Fsum2 + _Esum2; zone3Val = _Fsum3 + _Esum3; zone4Val = _Fsum4 + _Esum4; zone5Val = _Fsum5 + _Esum5; zone6Val = _Fsum6 + _Esum6; if (triggerActivated mainzonetrg) then{_Fsum1 = 1}; if (triggerActivated Emainzonetrg) then{_Esum1 = -1}; if (triggerActivated zone2trg) then{_Fsum2 = 1}; if (triggerActivated Ezone2trg) then{_Esum2 = -1}; if (triggerActivated zone3trg) then{_Fsum3 = 1}; if (triggerActivated Ezone3trg) then{_Esum3 = -1}; if (triggerActivated zone4trg) then{_Fsum4 = 1}; if (triggerActivated Ezone4trg) then{_Esum4 = -1}; if (triggerActivated zone5trg) then{_Fsum5 = 1}; if (triggerActivated Ezone5trg) then{_Esum5 = -1}; if (triggerActivated zone6trg) then{_Fsum6 = 1}; if (triggerActivated Ezone6trg) then{_Esum6 = -1}; if (mainzoneVal = 1) then {endMission}; //The problem if (zone2Val = 1) then {_Z2 = 1;"marker2" setMarkerColor "colorblue";}; if (zone2Val = 0) then {"marker2" setMarkerColor "ColorOrange"}; if (zone2Val = -1) then {_Z2 = -1;"marker2" setMarkerColor "colorred";}; if (zone3Val = 1) then {_Z3 = 1;"marker3" setMarkerColor "colorblue";}; if (zone3Val = 0) then {"marker3" setMarkerColor "ColorOrange"}; if (zone3Val = -1) then {_Z3 = -1;"marker3" setMarkerColor "colorred";}; if (zone4Val = 1) then {_Z4 = 1;"marker4" setMarkerColor "colorblue";}; if (zone4Val = 0) then {"marker4" setMarkerColor "ColorOrange"}; if (zone4Val = -1) then {_Z4 = -1;"marker4" setMarkerColor "colorred";}; if (zone5Val = 1) then {_Z5 = 1;"marker5" setMarkerColor "colorblue";}; if (zone5Val = 0) then {"marker5" setMarkerColor "ColorOrange"}; if (zone5Val = -1) then {_Z5 = -1;"marker5" setMarkerColor "colorred";}; if (zone6Val = 1) then {_Z6 = 1;"marker6" setMarkerColor "colorblue";}; if (zone6Val = 0) then {"marker6" setMarkerColor "ColorOrange"}; if (zone6Val = -1) then {_Z6 = -1;"marker6" setMarkerColor "colorred";}; sleep 30; };
  15. Sorry about that. Have never used the "==" before so i was unsure when to use it.
  16. Hello I am trying to get a officer that got deployed though a script, and with a addaction command spawn a helicopter and board it then fly away the startpoint. when the script execute the part with is related to the officer, then an error occur. This my be because i am trying to have a lot of code inside the addaction command, but i am not sure. The script: .....//(perhaps unrelated stuff) // FOBofficer FOBofficergroup = [_mainpos, WEST, ["B_officer_F","B_recon_medic_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; FOBofficer = leader FOBofficergroup; .... //(perhaps unrelated stuff) // Add "Dismantle FOB" option to FOBofficer with heli transport FOBofficer addAction ["Dismantle FOB",{ _FOBposretreat = getMarkerPos"markerFOB"; _mainpos = getMarkerPos "markerbase"; _spawnedVehicleArray = [_mainpos,random (360),"B_Heli_Transport_01_F",west] call BIS_fnc_spawnVehicle; _heli = _spawnedVehicleArray select 0; _heliCrew = _spawnedVehicleArray select 2; _wp = _heliCrew addWaypoint [_FOBposretreat,10]; _wp setWaypointType "LOAD"; _wp setwaypointstatements ["this land 'land'"]; _wp1 = _helicrew addWaypoint [_mainpos,10]; _wp2 = _helicrew addWaypoint [_mainpos,10]; _wp2 setwaypointstatements ["true","{deleteVehicle _x} foreach units group this;"]; //Changing group to remove the guard waypoint _FOBofficergroupgoinghome = createGroup EAST; {[_x] joinSilent _FOBofficergroupgoinghome} forEach (units _FOBofficergroupgoinghome); _wp1r = _FOBofficergroupgoinghome addWaypoint [_FOBposretreat, 20]; _wp1r setWaypointType "move"; sleep 90; _FOBfollower = units group (_FOBofficergroupgoinghome select 1); //Error: type group, expected array _FOBofficergoinghome = leader _FOBofficergroupgoinghome; _FOBofficergoinghome assignAsCargo _heli; _FOBfollower assignAsCargo _heli; [_FOBofficergoinghome, _FOBfollower] orderGetIn true; }]; .....//(perhaps unrelated stuff) The script is about 120 lines long so cutout the stuff that i didnt cause any problems, can add all of it if needed. It wasent untill i added the "addaction" command when it started to output error. Have spent about 8 hours straght to get this to work, if anyone have some input to what to do or know a script that i can look at. And for those who read this at this time, happy new year
  17. FederalRazer89

    Cant get ai to board the extration heli

    After about 4 hour i got it to work. Here is the script for those intrested. // FOBofficer FOBofficergroup = [_mainpos, WEST, ["B_officer_F","B_recon_medic_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; FOBofficer = leader FOBofficergroup; { _x assignAsCargo (_spawnedVehicleArray select 0); _x moveIncargo (_spawnedVehicleArray select 0);} foreach units FOBofficergroup; FOBofficergroup setBehaviour "SAFE"; _wp = _heliCrew addWaypoint [_FOBpos,10]; _wp setWaypointType "TR UNLOAD"; _wp setwaypointstatements ["this land 'land'"]; _wp1 = _helicrew addWaypoint [_mainpos,10]; _wp2 = _helicrew addWaypoint [_mainpos,10]; _wp2 setWaypointStatements ["true","{deleteVehicle _x} foreach units group this;"]; _wpFOB = FOBofficergroup addWaypoint [_playerpos, 0]; _wpFOB setWaypointType "guard"; _wp1a = _guard addWaypoint [[(_FOBpos select 0)+10,(_FOBpos select 1)+10], 10]; _wp1a setWaypointType "guard"; // Add "Dismantle FOB" option to FOBofficer with heli transport FOBofficer addAction ["Dismantle FOB",{ _FOBposretreat = getMarkerPos "markerFOB"; _mainpos = getMarkerPos "markerbase"; _spawnedVehicleArray = [_mainpos,random (360),"B_Heli_Transport_01_F",west] call BIS_fnc_spawnVehicle; _heli = _spawnedVehicleArray select 0; _heliGroup = _spawnedVehicleArray select 2; _wp = _heliGroup addWaypoint [_FOBposretreat,10]; _wp1 = _heliGroup addWaypoint [_FOBposretreat,10]; _wp1 setWaypointType "LOAD"; _wp1 setwaypointstatements ["true","this land 'land'"]; _wp2 = _heliGroup addWaypoint [_mainpos,10]; _wp2 setwaypointstatements ["true","{deleteVehicle _x} forEach (thisList + [vehicle this]);"]; // hint str (units FOBofficergroup); _FOBfollower = ((units FOBofficergroup) select 1); FOBofficer = leader FOBofficergroup; waitUntil {(FOBofficer distance _heli) < 200}; FOBofficer assignAsCargo _heli; _FOBfollower assignAsCargo _heli; [FOBofficer, _FOBfollower] orderGetIn true; deleteWaypoint [FOBofficergroup,1]; wpFOB = FOBofficergroup addWaypoint [_FOBposretreat,10]; wpFOB setWaypointType "GETIN"; }]; Thanks for the help, would have taken a lot more time otherwise.
  18. FederalRazer89

    Cant get ai to board the extration heli

    Thanks for the tip theend3r. Dont have too much knowledge in programming prior to Arma, 3D modeling.
  19. FederalRazer89

    Cant get ai to board the extration heli

    Tried it now, but i get the error on the line: "_FOBfollower = ((units _FOBofficergroupgoinghome) select 1);" Error zero divisor dose that mean that the second unit in the group dosent exist?
  20. FederalRazer89

    Cant get ai to board the extration heli

    Thanks davidoss Going to check how it works when i get home from work.
  21. FederalRazer89

    Cant get ai to board the extration heli

    The "wp setwaypointstatements ["this land 'land'"];" is something that i found when watching this tutorial. The error i get is on this line: _FOBfollower = units group (_FOBofficergroupgoinghome select 1); type group, expected array That was just a typo on my part
  22. It worked, and i added a waypoint to the nearest house. Thanks for all the help. The added line: _officer2 = createGroup east; _Enemyofficer2 = "O_officer_F" createUnit [_meanPosition,_officer2]; _selecthouse = nearestTerrainObjects [_officer2 ,["BUILDING", "HOUSE"],750,true]; wp_ = _officer2 addWaypoint [(_selecthouse select 0),0]; Going to tweak the paramaters a bit more now.
  23. As the title suggest i am trying to get some position from arrays of the command "nearestObjects". I want the "nearestObjects" to look for a certain amount of house, so i can identify a village or town with the script and then use the average of all the listed house in the array. That way the position i am after will not be heavily affected by one or two houses caught in the calclated radius. _Center = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); _mapsize = (_Center select 0)*2; _RandomStartPos = [_Center, (_mapsize*0.77), (_mapsize*0.78), 3, 1, 20, 0] call BIS_fnc_findSafePos; sleep 1; player moveInCargo [_heli,5]; _enemySpawnPos = [_RandomStartPos, (_mapsize*0.7), _mapsize*0.71, 3, 0, 20, 0] call BIS_fnc_findSafePos; createMarker ["marker2",_enemySpawnPos]; "marker2" setMarkerShape "ELLIPSE"; "marker2" setMarkerSize [500,500]; "marker2" setMarkerText "Enemy resupply line"; "marker2" setMarkerAlpha 0.5; _findhouses = nearestObjects [_enemySpawnPos, "house"", (_mapsize*0.2)]; //small problems on this line _divide = count _findhouses; _fortifiedpos = _findhouses/_divide; //The bigger problem createMarker ["marker3",_fortifiedpos]; "marker3" setMarkerShape "ELLIPSE"; "marker3" setMarkerSize [500,500]; "marker3" setMarkerText "Enemy resupply line"; "marker3" setMarkerAlpha 0.5; I not really sure how should proceed, because i dont think the line "_fortifiedpos" will work, the problem above prevents it from execute. "nearestObjects" contains arrays of the houses and the houses also have arrays, if there isnt a command that would merge the arrays. If anyone have any input that would be nice, arrays are some a bit new to me so this is kind of over my head.
×