---
name: "BIS_fnc_countdown"
type: function
status: ok
groups: ["Missions"]
arma3_since: "1.02"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_countdown
revid: 378252
updated: 2026-03-25T14:24:56Z
---

# BIS_fnc_countdown

*Function · Missions · Arma 3 v1.02*

## Description

Triggers a countdown.

> [!NOTE]
> The **initial** countdown can be accessed via [missionNamespace](../commands/missionNamespace.md)'s variable **BIS_fnc_countdown_time**.
>
> The initial value is either `serverTime + timeInSeconds` (if set globally) or `time + timeInSeconds` (if set locally).
> To return the left-over time see [#Example 4](../functions/BIS_fnc_countdown.md#example-4).

## Syntax

```sqf
[timeInSeconds, global] call BIS_fnc_countdown
```

**Parameters:**

- `timeInSeconds`: [Number](../topics/Number.md) or [Boolean](../topics/Boolean.md):
  - [Number](../topics/Number.md):
    - Any number to set the length of the countdown in seconds
    - -1 to set the countdown to [nil](../commands/nil.md)
    - 0 to return the left-over time
  - [Boolean](../topics/Boolean.md):
    - [true](../commands/true.md) to find out if countdown is active and if there is left-over time
- `global`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) true to set it globally, false to set it locally

**Returns:** - [Number](../topics/Number.md):
  - If set locally: [time](../commands/time.md) + timeInSeconds (see [#Example 1](../functions/BIS_fnc_countdown.md#example-1))
  - If set globally: [serverTime](../commands/serverTime.md) + timeInSeconds (see [#Example 2](../functions/BIS_fnc_countdown.md#example-2))
  - Returns -1 if countdown is set to [nil](../commands/nil.md) (see [#Example 3](../functions/BIS_fnc_countdown.md#example-3))
  - Return left-over time (see [#Example 4](../functions/BIS_fnc_countdown.md#example-4))
- [Boolean](../topics/Boolean.md): returns [true](../commands/true.md) when countdown is > 0 else [false](../commands/false.md) (see [#Example 5](../functions/BIS_fnc_countdown.md#example-5))

## Examples

### Example 1

```sqf
private _initialCountdown = [50, false] call BIS_fnc_countdown; // sets countdown to 50 seconds where function is executed
```

### Example 2

```sqf
private _initialCountdown = [50] call BIS_fnc_countdown; // sets countdown to 50 seconds globally
```

### Example 3

```sqf
[-1] call BIS_fnc_countdown; // sets BIS_fnc_countdown_time to nil
```

### Example 4

```sqf
private _timeLeft = [0] call BIS_fnc_countdown; // returns the left over-time
```

### Example 5

```sqf
private _isTimeLeft = [true] call BIS_fnc_countdown; // returns true if countdown is greater than 0
```

## See also

[BIS_fnc_VRTimer](../functions/BIS_fnc_VRTimer.md)

<sub>Source: [BI Community Wiki — BIS fnc countdown](https://community.bistudio.com/wiki/BIS_fnc_countdown) (revision 378252).</sub>
