C-130 side mission halp

allen bashaw

New Member
Hey guys. I'm having an issue with the side missions my server is running. I don't know who made it, but I hope it's not too different from what you're used to.

All of the other missions are working perfectly, all but this C-130 medical crash in Novy. The mission itself seems to glitch to where Humvees/UAZ's are clipped inside of walls and buildings. Sometimes the AI at the mission are all dead inside a wall.

We can get to the crate with the supplies, however the mission never comes up with the "completed" text.

I'm hoping I can fix it by just moving it north a little into a field. The problem I have is that I do not know how to change the coords of the mission. Here is the "broken" mission file...

Code:
//Medical C-130 Crash by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
 
private ["_coords","_MainMarker","_wait"];
[] execVM "\z\addons\dayz_server\Missions\SMGoMajor.sqf";
WaitUntil {MissionGo == 1};
 
_coords = [getMarkerPos "center",0,5600,100,0,20,0] call BIS_fnc_findSafePos;
 
[nil,nil,rTitleText,"A C-130 carrying medical and building supplies has crashed and bandits are securing the site! Check your map for the location!", "PLAIN",10] call RE;
 
Ccoords = _coords;
publicVariable "Ccoords";
[] execVM "debug\addmarkers.sqf";
 
_c130wreck = createVehicle ["C130J_wreck_EP1",[(_coords select 0) + 30, (_coords select 1) - 5,0],[], 0, "NONE"];
_hummer = createVehicle ["HMMWV_DZ",[(_coords select 0) - 20, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_hummer1 = createVehicle ["UAZ_Unarmed_UN_EP1",[(_coords select 0) - 30, (_coords select 1) - 10,0],[], 0, "CAN_COLLIDE"];
_hummer2 = createVehicle ["SUV_DZ",[(_coords select 0) + 10, (_coords select 1) + 5,0],[], 0, "CAN_COLLIDE"];
 
_c130wreck setVariable ["Sarge",1,true];
_hummer setVariable ["Sarge",1,true];
_hummer1 setVariable ["Sarge",1,true];
_hummer2 setVariable ["Sarge",1,true];
 
_crate = createVehicle ["USVehicleBox",[(_coords select 0) - 10, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate] execVM "\z\addons\dayz_server\missions\misc\fillBoxesM.sqf";
 
_crate setVariable ["Sarge",1,true];
 
_crate2 = createVehicle ["USLaunchersBox",[(_coords select 0) - 6, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate2] execVM "\z\addons\dayz_server\missions\misc\fillBoxesS.sqf";
_crate2 setVariable ["Sarge",1,true];
 
_aispawn = [[(_coords select 0) + 20, _coords select 1,0],80,6,6,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [[(_coords select 0) + 30, _coords select 1,0],80,6,6,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [[(_coords select 0) + 20, _coords select 1,0],40,4,4,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [[(_coords select 0) + 30, _coords select 1,0],40,4,4,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
 
waitUntil{{isPlayer _x && _x distance _c130wreck < 5 } count playableunits > 0};
 
[] execVM "debug\remmarkers.sqf";
MissionGo = 0;
Ccoords = 0;
publicVariable "Ccoords";
 
 
[nil,nil,rTitleText,"The crash site has been secured by survivors!", "PLAIN",6] call RE;
SM1 = 1;
 
 
[0] execVM "\z\addons\dayz_server\missions\major\SMfinder.sqf";

Any info you can provide may help.

Thanks.
 
Change this:
Code:
_coords = [getMarkerPos "center",0,5600,100,0,20,0] call BIS_fnc_findSafePos;
To this:
Code:
_coords =  [getMarkerPos "center",0,7000,10,0,10,0] call BIS_fnc_findSafePos;
 
I'll give this a try, thanks a lot!

If it's not too much trouble, could you explain how you read these coords?

I may want to do some more tweaking in the future!
 
Code:
BIS_fnc_findSafePos
How to find safe position with open ground etc.
 
Please read BIS_fnc_SpawnGroup how to place Functions manager gamelogic and to check if its running and initialized.
 
Parameter    Description
1    Position
2    Minimum distance
3    Maximum distance
4    Maximum distance from nearest object
5    0 - cant be in water, 1 - ?
6    Terrain gradient (how steep terrain)
7    0 - shore mode; does not have to be in shore
_newPos = [_pos, 0, 500, 30, 0, 20, 0] call BIS_fnc_findSafePos;

If it cant find a safe position it chooses the center of the map. (Novy Sobor on Chernarus)
 
Alright! seems to have worked, well the repositioning anyway. Players are still unable to complete this mission. No pop-up about being secured. Anyone know about that?
 
Distance in this part of the code is set to 5 meters. Means you have to be INSIDE the C130 wreck to complete mission. Change the 5 to the number of meters you want the completion distance to be.
Code:
waitUntil{{isPlayer _x && _x distance _c130wreck < 5 } count playableunits > 0};
 
I've noticed Major SM1 seems to have issues sometimes too.
(Its two UAZ's. Bandits have discovered a weapons cache.)

Watch and see if it needs fixed on your server too.
 
personally I just pasted one of the other missions over the c130 mission because its rather glitchy but I may give this a try.
 
why not change the
BIS_fnc_findSafePos

to actual cords? I did this with my namalsk server and got 15 cords it can choose from at random
 
Back
Top