{"name":"BIS_fnc_countdown","title":"BIS fnc countdown","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_countdown","revid":378252,"updated":"2026-03-25T14:24:56Z","groups":["Missions"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Triggers a countdown.\n\n> [!NOTE]\n> The **initial** countdown can be accessed via missionNamespace's variable **BIS_fnc_countdown_time**.\n>\n> The initial value is either `serverTime + timeInSeconds` (if set globally) or `time + timeInSeconds` (if set locally).\n>\n> To return the left-over time see Example 4.","syntaxes":[{"syntax":"[timeInSeconds, global] call BIS_fnc_countdown","params":[{"name":"timeInSeconds","type":"Number or Boolean:","description":"Number or Boolean:\n\n- Number:\n  - Any number to set the length of the countdown in seconds\n  - -1 to set the countdown to nil\n  - 0 to return the left-over time\n- Boolean:\n  - true to find out if countdown is active and if there is left-over time","type_expr":"Number | Boolean","text":"timeInSeconds: Number or Boolean:\n\n- Number:\n  - Any number to set the length of the countdown in seconds\n  - -1 to set the countdown to nil\n  - 0 to return the left-over time\n- Boolean:\n  - true to find out if countdown is active and if there is left-over time"},{"name":"global","type":"Boolean","optional":true,"default":"true","description":"true to set it globally, false to set it locally","type_expr":"Boolean","text":"global: Boolean - (Optional, default true) true to set it globally, false to set it locally"}],"returns":{"type_expr":"Number | Boolean","description":"- Number: - If set locally: time + timeInSeconds (see Example 1) - If set globally: serverTime + timeInSeconds (see Example 2) - Returns -1 if countdown is set to nil (see Example 3) - Return left-over time (see Example 4) - Boolean: returns true when countdown is > 0 else false (see Example 5)","text":"- Number:\n  - If set locally: time + timeInSeconds (see Example 1)\n  - If set globally: serverTime + timeInSeconds (see Example 2)\n  - Returns -1 if countdown is set to nil (see Example 3)\n  - Return left-over time (see Example 4)\n- Boolean: returns true when countdown is > 0 else false (see Example 5)"}}],"examples":[{"code":["private _initialCountdown = [50, false] call BIS_fnc_countdown; // sets countdown to 50 seconds where function is executed"]},{"code":["private _initialCountdown = [50] call BIS_fnc_countdown; // sets countdown to 50 seconds globally"]},{"code":["[-1] call BIS_fnc_countdown; // sets BIS_fnc_countdown_time to nil"]},{"code":["private _timeLeft = [0] call BIS_fnc_countdown; // returns the left over-time"]},{"code":["private _isTimeLeft = [true] call BIS_fnc_countdown; // returns true if countdown is greater than 0"]}],"see_also":["BIS_fnc_VRTimer"]}