---
name: "BIS_fnc_endMission"
type: function
status: ok
groups: ["Missions"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_endMission
revid: 341330
updated: 2023-05-22T00:44:50Z
---

# BIS_fnc_endMission

*Function · Missions · Arma 3 v0.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];`.

> [!IMPORTANT]
> This function should always be used instead of the simple [endMission](../commands/endMission.md)/[failMission](../commands/failMission.md) commands or trigger endings; otherwise, singleplayer scenarios will not properly be marked as played/finished in the game and on Steam!

## Syntax

```sqf
[endName, isVictory, fadeType, playMusic, cancelTasks] call BIS_fnc_endMission
```

**Parameters:**

- `endName (Optional, default "end1")`:
  - [String](../topics/String.md) - end type from `configFile >> "CfgDebriefing"`. Same as with [endMission](../commands/endMission.md) and [failMission](../commands/failMission.md)
  - [Array](../topics/Array.md) - in format [endName, ID], will be composed to "endName_ID" string
- `isVictory`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) [true](../commands/true.md) for successful end, false for failed end
- `fadeType`: [Boolean](../topics/Boolean.md) or [Number](../topics/Number.md) - (Optional, default [true](../commands/true.md)) true for signature closing shot. When number, simple fade to black of given duration is used
- `playMusic`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) [false](../commands/false.md) to disable automatic music during closing shot
- `cancelTasks`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to cancel all pending tasks

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
"end1" call BIS_fnc_endMission;
```

### Example 2

```sqf
["epicFail", false, 2] call BIS_fnc_endMission;
```

## See also

[BIS_fnc_endMissionServer](../functions/BIS_fnc_endMissionServer.md) · Debriefing · [endMission](../commands/endMission.md) · [markAsFinishedOnSteam](../commands/markAsFinishedOnSteam.md)

## Community notes

**R3vo** — 2016-03-21

To end a multiplayer mission one can use `["end1", true] remoteExecCall ["BIS_fnc_endMission"];` - see also [BIS_fnc_endMissionServer](../functions/BIS_fnc_endMissionServer.md).

<sub>Source: [BI Community Wiki — BIS fnc endMission](https://community.bistudio.com/wiki/BIS_fnc_endMission) (revision 341330).</sub>
