Coladebote 46 Posted August 24, 2021 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
pierremgi 4736 Posted August 25, 2021 Use BIS_fnc_endMission In MP, see R3vo's note. 1 Share this post Link to post Share on other sites
Coladebote 46 Posted August 25, 2021 Thank you very much, Pierre. I owe you another beer. Share this post Link to post Share on other sites
Coladebote 46 Posted August 25, 2021 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]; }; 1 Share this post Link to post Share on other sites