Dayz Mission AI not validated

zappi

Well-Known Member
Hi all,
I installed missions and it's great great great...

I used the one for namalsk and i modified it to run it correctly on epoch.

The problem is, some mission dont finished...

The key to finish the mission is:

waitUntil{{isPlayer _x && _x distance box < 50 } count playableunits > 1};

And whatever the player done ( approche under 50 ms from the box or killing all AI) the mission dont finish.

I wanting to fix this, how to do that?

Thx for your help
 
Most the ones I see are like so:
waitUntil{{isPlayer _x && _x distance _baserunover < 10 } count playableunits > 0};

and _baserunover is a spawned object
_baserunover = createVehicle ["Land_HouseV_1I3",[(_coords select 0) +2, (_coords select 1) +5,-0.3],[], 0, "CAN_COLLIDE"];

So it is making sure that AI are all dead and that the player is within 10meters of the building. You can try to make the 10 larger but it will lead to players capturing the mission before all the AI are dead, and then the mission being unmarked with AI still alive (if the player who attempted to capture it dies).
 
Yeah iv got this baserunover line sometime on some missions.
But every missions dont have a baserunover, some is only soldier and box.

And whatever is used ( baserunover or vox) it dont always work everytime.
I already settled the count playableunits >0 and it didnt change, some missions still dont finish...
 
Try this. It will ignore the AI that are around.
waitUntil{isPlayer _x && _x distance box < 50 };
 
Yep i already tryed that way, i'm testing it so far ( but it seem it dont work so far, still testing)
 
Increase 50 to a higher number then?
If all the AI are dead, and you are within the 50m of the box, then the problem doesn't lie in that line.
 
It didnt work.

But i found a solution:

I replaced all
waitUntil{{isPlayer _x && _x distance box < 50 } count playableunits > 1};

by

_checking = 1;
while {_checking == 1} do {
_people = nearestObjects [_coords,["Man"],20];
if ({isPlayer _x} count _people > 0) then {_checking = 0};
sleep 1;
};

And that's working great once player approach under 20 meters from te box the mission finish
 
Code:
//Special weapons squad script Created by TheSzerdi Edited by Falcyn [QF]
private ["_coords","_dummymarker","_wait","_coord1","_coord2","_coord3","_coord4","_coord5","_coord6","_coord7","_coord8","_coord9","_coord10","_coord11","_coord12"];
[] execVM "\z\addons\dayz_server\Missions\SMGoMajor.sqf";
WaitUntil {MissionGo == 1};
 
_coord1 = [];
_coord2 = [];
_coord3 = [];
_coord4 = [];
_coord5 = [];
_coord6 = [];
_coord7 = [];
_coord8 = [];
_coord9 = [];
_coord10 = [];
_coord11 = [];
_coord12 = [];
 
_coords = [_coord1, _coord2, _coord3, _coord4, _coord5, _coord6, _coord7, _coord8, _coord9, _coord10, _coord11, _coord12] call BIS_fnc_selectRandom;
 
[nil,nil,rTitleText,"Un bataillon des forces spéciales vient de débarquer. Qui serra la proie?!", "PLAIN",6] call RE;
[nil,nil,rGlobalRadio,"Un bataillon des forces spéciales vient de débarquer. Qui serra la proie?!"] call RE;
[nil,nil,rHINT,"Un bataillon des forces spéciales vient de débarquer. Qui serra la proie?!"] call RE;
 
Ccoords = _coords;
publicVariable "Ccoords";
[] execVM "debug\addmarkers.sqf";
 
box = createVehicle ["USLaunchersBox",[(_coords select 0) - 3, (_coords select 1) - 3,0],[], 0, "NONE"];
[BOX] execVM "\z\addons\dayz_server\missions\misc\fillLaunchBoxes.sqf";
 
_aispawn = [_coords,80,6,6,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [_coords,80,6,6,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [_coords,80,6,6,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [_coords,40,4,4,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [_coords,40,4,4,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
sleep 5;
_aispawn = [_coords,40,4,4,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sqf";//AI Guards
 
waitUntil{{isPlayer _x && _x distance box < 50 } count playableunits > 1};
 
[nil,nil,rTitleText,"Les forces spéciales sont annihilées! Excellent, servez vous maintenant!", "PLAIN",6] call RE;
[nil,nil,rGlobalRadio,"Les forces spéciales sont annihilées! Excellent, servez vous maintenant!"] call RE;
[nil,nil,rHINT,"Les forces spéciales sont annihilées! Excellent, servez vous maintenant!"] call RE;
 
[] execVM "debug\remmarkers.sqf";
MissionGo = 0;
Ccoords = 0;
publicVariable "Ccoords";
 
SM1 = 1;
[0] execVM "\z\addons\dayz_server\missions\major\SMfinder.sqf";
 
Back
Top