Jump to content

Recommended Posts

Hi guys:
With this code, in the editor, when the objective is met, the task skips and 30 seconds later the END OF MISSION screen appears. It's exactly what I want to happen. But on the server it doesn't work the same. When the objective is fulfilled, after more than 30 seconds the mission closes, without appearing any END OF MISSION screen.
I'm sure I'm doing something wrong. The truth is that a help would be great. Thanks.

 

0 = [] spawn {
sleep 1;

_markerstr = createMarker ["marker_1",[12142.8,8434.15]];
_markerstr setMarkerShape "ICON";
[west,["task1"],["Take the military barracks and execute the post commander","MILITARY OBJECTIVE 1","marker_1"], getMarkerPos "marker_1" ,"CREATED",2,true,"move"] call BIS_fnc_taskCreate;
waitUntil{!(alive OFFICIAL_2)};
["task1", "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
sleep 30;
endMission "END1";

};

 

Share this post


Link to post
Share on other sites

Hi Pierre, it works perfectly on the server. R3vo's note was there, but I didn't see it. Haste is not a good counselor... Thank you, Pierre.

 

The correct code looks like this, in case someone needs it:

 

0 = [] spawn {
sleep 1;

_markerstr = createMarker ["marker_1",[12142.8,8434.15]];
_markerstr setMarkerShape "ICON";
[west,["task1"],["Take the military barracks and execute the post commander","MILITARY OBJECTIVE 1","marker_1"], getMarkerPos "marker_1" ,"CREATED",2,true,"move"] call BIS_fnc_taskCreate;
waitUntil{!(alive OFFICIAL_2)};
["task1", "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
sleep 30;
["end1", true] remoteExecCall ["BIS_fnc_endMission", 0];

};

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×