---
name: "BIS_fnc_eventTimeline"
type: function
status: ok
groups: ["Timeline", "Systems"]
arma3_since: "1.78"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_eventTimeline
revid: 352082
updated: 2024-02-01T23:24:45Z
---

# BIS_fnc_eventTimeline

*Function · Timeline, Systems · Arma 3 v1.78*

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

## Description

Universal system for playing sequential events defined by time. 

> [!NOTE]
> *codeInterrupt* and *codeEnd* are [call](../commands/call.md)ed while the code in the timeline is [spawn](../commands/spawn.md)ed.

## Syntax

```sqf
[timeline, index, music, codeInterrupt, codeEnd] call BIS_fnc_eventTimeline
```

**Parameters:**

- `timeline`: [Array](../topics/Array.md) - timeline in format [[1.0, {code}], [2.0, {code}], [2.3, {code}], [4.7, {code}]]
- `index`: [Number](../topics/Number.md) - (Optional, default 0) index of the event to play
- `music`: [String](../topics/String.md) - (Optional, default "") music to be played which will provide the sync time for the timeline
- `codeInterrupt`: [Code](../topics/Code.md) - (Optional, default
  `params ["_pointer", "_baseTime", "_evenTime"]; ["Timeline interrupted while playing event nr.: %1 (%2)", _pointer, _baseTime + _eventTime] call BIS_fnc_logFormat;`)
  Code to be executed if the timeline is interrupted with
  `missionNamespace setVariable ["BIS_fnc_eventTimeline_playing", false]`
- `codeEnd`: [Array](../topics/Array.md) or [Code](../topics/Code.md) - (Optional, default [nil](../commands/nil.md)) [Code](../topics/Code.md) or [Array](../topics/Array.md) of codes to be executed once the timeline is finished. The codes are [call](../commands/call.md)ed one after the other.

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

## Examples

### Example 1

```sqf
private _timeline =
[
    [0.0, { hint "Start of the Timeline" }],
    [1.0, { hint "Event 1" }],
    [3.0, { hint "End of the timeline" }]
];

[_timeline, 0, "", { hint "Interrupted" }, { hint "Timeline done" }] spawn BIS_fnc_eventTimeline;
```

## See also

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

<sub>Source: [BI Community Wiki — BIS fnc eventTimeline](https://community.bistudio.com/wiki/BIS_fnc_eventTimeline) (revision 352082).</sub>
