{"name":"endMission","operator":null,"title":"endMission","type":"command","url":"https://community.bistudio.com/wiki/endMission","revid":338926,"updated":"2023-04-17T15:26:24Z","groups":["Mission Information"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"local","server_exec":false},"exec":null,"description":"Finish the mission.\n**Mission saves are deleted**. Use failMission if they should not be.\n\n> [!NOTE]\n> **Arma 3:** To maintain Arma 3 visual style, it is recommended to use BIS_fnc_endMission instead.","syntaxes":[{"syntax":"endMission endType","since":null,"effect":null,"exec":null,"params":[{"name":"endType","type":"String","optional":false,"default":null,"description":"can be a custom one Arma 3 v1.00, or one of:\n- \"CONTINUE\" (does nothing)\n- \"KILLED\"\n- \"LOSER\"\n- \"END1\"\n- \"END2\"\n- \"END3\"\n- \"END4\"\n- \"END5\"\n- \"END6\"","types":["String"],"since":null,"text":"endType: String - can be a custom one Arma 3 v1.00, or one of:\n- \"CONTINUE\" (does nothing)\n- \"KILLED\"\n- \"LOSER\"\n- \"END1\"\n- \"END2\"\n- \"END3\"\n- \"END4\"\n- \"END5\"\n- \"END6\""}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"endType","types":["String"]}}],"examples":[{"text":"```sqf\nendMission \"END1\";\n```","code":["endMission \"END1\";"]},{"text":"```sqf\n[\"END1\"] remoteExec [\"endMission\", 0, true]; // Arma 3\n```","code":["[\"END1\"] remoteExec [\"endMission\", 0, true]; // Arma 3"]}],"multiplayer":"To end mission properly so that everyone goes to debriefing at the same time, this command should be executed on every machine (see #Example 2).","problems":null,"aliases":[],"see_also":["missionEnd","failMission","forceEnd"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Mission Information","Introduced with Arma 2 version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}