---
name: "BIS_fnc_fadeEffect"
type: function
status: ok
groups: ["GUI"]
arma3_since: "1.00"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_fadeEffect
revid: 324311
updated: 2022-07-01T12:00:44Z
---

# BIS_fnc_fadeEffect

*Function · GUI · Arma 3 v1.00*

Locality: effect **local** · executed with **spawn**

## Description

Easily carry out complex fading. Default values will be used if parameters are not defined or set to nil.

## Syntax

```sqf
[fadeInOrOut, blackOrWhite, duration, blur, music, ending, success] spawn BIS_fnc_fadeEffect
```

**Parameters:**

- `fadeInOrOut`: [Number](../topics/Number.md) - (Optional, default 1) 0 to fade out, 1 to fade in
- `fadeColor`: [String](../topics/String.md) - (Optional, default "BLACK") **case-sensitive** can be "BLACK" or "WHITE"
- `duration`: [Number](../topics/Number.md) - (Optional, default 3) fade duration in seconds
- `blur`: [Number](../topics/Number.md) - (Optional, default 0) 0 to not blur, 1 to blur (blur-in for fade-in, blur-out for fade-out)
- `music`: [String](../topics/String.md) - (Optional, default "") **only for fade-out** music class name defined in [CfgMusic](../topics/Description.ext.md#cfgmusic)
- `ending`: [String](../topics/String.md) - (Optional, default "") "" to not end the mission, else a value compatible with [endMission](../commands/endMission.md) or [failMission](../commands/failMission.md). **Will end mission only for the local player**
- `success`: [Number](../topics/Number.md) - (Optional, default 1) **if *ending* != ""** 1 to end mission with success, 0 to fail mission

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

## Examples

### Example 1

```sqf
[1, "WHITE", 5, 1] spawn BIS_fnc_fadeEffect;
```

## See also

[endMission](../commands/endMission.md) · [failMission](../commands/failMission.md) · [BIS_fnc_endMission](../functions/BIS_fnc_endMission.md) · [BIS_fnc_endMissionServer](../functions/BIS_fnc_endMissionServer.md) · [titleCut](../commands/titleCut.md)

<sub>Source: [BI Community Wiki — BIS fnc fadeEffect](https://community.bistudio.com/wiki/BIS_fnc_fadeEffect) (revision 324311).</sub>
