Dani2033 0 Posted June 12, 2021 *** Fixed *** I changed this: _wp1 = _heliGroup addWaypoint [_heliLz,0]; to this: _wp1 = _heliGroup addWaypoint [_heliLz,-1]; Totally missed it in the biki *************** Hi, I'm new to scripting in Arma and I have been trying to create a script to spawn a helicopter, load it with other group and unload them in a position. The problem comes when their landing zones are close and they start to fight between each other for them, however I have tried to do it with the eden editor and if you attach each waypoint to each helipad they seem to respect it. I have tried to attach the waypoint to the helipad with waypointAttachObject but I don't get the same result. I have also read in the forum that the helicopter AI claims the lz when flying over them but even if I assign them routes without hovering other landing zones there is no change. The code: (it's supposed to be executed in a dedicated server) Spoiler params [ ["_pSpawnPoint", 0], ["_pLzReinforcements", 0], ["_pHeli", "B_Heli_Transport_01_F"], ["_grpPreset", "preset1"] ]; _heliReinforcement = { _groupSide = missionNamespace getVariable "EAG_AICONFIG_SIDE"; _heliSpawn = getMarkerPos _pSpawnPoint vectorAdd [0,0,60]; _heliLz = _pLzReinforcements; _curPreset = [_grpPreset] call eag_fnc_selectPreset; _group = [[0,0,0], _groupSide,_curPreset ,[],[],[],[],[],180] call BIS_fnc_spawnGroup; [_group] call eag_fnc_taskPlayer; _heli = [_heliSpawn, (random 360), _pHeli, _groupSide] call BIS_fnc_spawnVehicle; _heliVehicle = _heli#0; _heliGroup = _heli#2; _heliPilot = (units _heliGroup)#0; _totalCrewCount = [_pHeli, true] call BIS_fnc_crewCount; _crewCount = [_pHeli, false] call BIS_fnc_crewCount; _cargoCount = _totalCrewCount - _crewCount; //Comportamineto del piloto _heliPilot setBehaviour "CARELESS"; _heliPilot disableAI "AUTOCOMBAT"; // _heliPilot disableAI "CHECKVISIBLE"; // Por comprobar si la IA sigue aterrizando sin ello _heliVehicle flyInHeight 20; { if (_forEachIndex < _cargoCount) then { _x assignAsCargo _heliVehicle; _x moveIncargo _heliVehicle; } else { deleteVehicle _x; } } forEach (units _group); _wp1 = _heliGroup addWaypoint [_heliLz,0]; _wp1 setWaypointType "TR UNLOAD"; _wp1 waypointAttachObject _heliLz; // _wp1 setWaypointType "TR UNLOAD"; _wp2 = _heliGroup addWaypoint [_heliSpawn,25]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointStatements ["true", "_vehicleToDelete = (vehicle this); {_vehicleToDelete deleteVehicleCrew _x} forEach crew _vehicleToDelete; deleteVehicle _vehicleToDelete;"]; True }; //Comprobar si el HC está presente HC1Present = if(isNil "HC4") then{False} else{True}; //Ejecutar spawn en HC si está presente if(HC1Present && isMultiplayer) then{ if(!isServer && !hasInterface) then{ diag_log "HC: Creando IA en el HC"; [] call _heliReinforcement; }; } //Ejecutar en Servidor si no hay HC else{ if(isServer) then{ diag_log "HC: Creando IA en el servidor"; [] call _heliReinforcement; }; }; This is what happens when I execute the script: And here you can see how one of the helis didn't like his assigned lz Here is the behaviour with the eden created waypoints: Share this post Link to post Share on other sites