{"name":"BIS_fnc_endMission","title":"BIS fnc endMission","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_endMission","revid":379265,"updated":"2026-10-30T23:43:31Z","groups":["Missions"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Ends mission with a signature shot or a fade effect, marks it finished for Steam and activates a key in format `activateKey format [\"BIS_%1.%2_done\", missionName, worldName];`.\n\n> [!IMPORTANT]\n> This function should always be used instead of the simple endMission/failMission commands or trigger endings; otherwise, singleplayer scenarios will not properly be marked as played/finished in the game and on Steam!","syntaxes":[{"syntax":"[endName, isVictory, fadeType, playMusic, cancelTasks] call BIS_fnc_endMission","params":[{"name":"endName","type":"String or Array","optional":true,"default":"\"end1\"","description":"String - end type from `configFile >> \"CfgDebriefing\"`. Same as with endMission and failMission\n- Array - in format [endName, ID], will be composed to \"endName_ID\" string","type_expr":"String | Array","text":"endName: String or Array - (Optional, default \"end1\")\n\n- String - end type from `configFile >> \"CfgDebriefing\"`. Same as with endMission and failMission\n- Array - in format [endName, ID], will be composed to \"endName_ID\" string"},{"name":"isVictory","type":"Boolean","optional":true,"default":"true","description":"true for successful end, false for failed end","type_expr":"Boolean","text":"isVictory: Boolean - (Optional, default true) true for successful end, false for failed end"},{"name":"fadeType","type":"Boolean or Number","optional":true,"default":"true","description":"true for signature closing shot. When number, simple fade to black of given duration is used","type_expr":"Boolean | Number","text":"fadeType: Boolean or Number - (Optional, default true) true for signature closing shot. When number, simple fade to black of given duration is used"},{"name":"playMusic","type":"Boolean","optional":true,"default":"true","description":"false to disable automatic music during closing shot","type_expr":"Boolean","text":"playMusic: Boolean - (Optional, default true) false to disable automatic music during closing shot"},{"name":"cancelTasks","type":"Boolean","optional":true,"default":"false","description":"true to cancel all pending tasks","type_expr":"Boolean","text":"cancelTasks: Boolean - (Optional, default false) true to cancel all pending tasks"}],"returns":{"type":"Boolean","type_expr":"Boolean"}}],"examples":[{"code":["\"end1\" call BIS_fnc_endMission;"]},{"code":["[\"epicFail\", false, 2] call BIS_fnc_endMission;"]}],"see_also":["BIS_fnc_endMissionServer","Debriefing","endMission","markAsFinishedOnSteam"],"notes":[{"user":"R3vo","date":"2016-03-21T11:12:00Z","text":"To end a multiplayer mission one can use `[\"end1\", true] remoteExecCall [\"BIS_fnc_endMission\"];` - see also BIS_fnc_endMissionServer."}],"categories_extra":["Introduced with Take On Helicopters version 1.00","Take On Helicopters: Functions","Take On Helicopters: New Functions"]}