> For the complete documentation index, see [llms.txt](https://raia-software-inc.gitbook.io/tacview-2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia-software-inc.gitbook.io/tacview-2-documentation/api-reference/api-reference/playback-control/set-telemetry-playback-speed.md).

# SetTelemetryPlaybackSpeed()

Sets the telemetry playback speed factor.

Use this function to control how fast telemetry time moves when playback is running forward or backward.

## Syntax

```lua
SetTelemetryPlaybackSpeed(playbackSpeed)
```

## Parameters

### playbackSpeed

Type: `number`

Playback speed factor.

The value must be greater than `0.0`.

A value of `1.0` means normal playback speed, matching real time.

A value of `0.5` means half speed.

A value of `2.0` means twice the normal speed.

## Return value

This function does not return a value.

## Remarks

The playback speed factor controls how fast telemetry time advances when playback is running.

It is independent from the current playback state. Changing the speed does not start, pause, or rewind playback by itself.

There is no fixed upper limit, but very high values may skip over short events or make analysis harder to follow.

Use `GetTelemetryPlaybackSpeed()` to read the current playback speed factor.

## Examples

### Set normal playback speed

```lua
SetTelemetryPlaybackSpeed(1.0)
```

### Toggle between slow motion and real time

```lua
local playbackSpeed = GetTelemetryPlaybackSpeed()

if playbackSpeed == 1.0 then

	SetTelemetryPlaybackSpeed(0.5)
	LogInformation("Playback speed set to half speed.")

else

	SetTelemetryPlaybackSpeed(1.0)
	LogInformation("Playback speed set to real time.")

end
```

### Display the new playback speed

```lua
SetTelemetryPlaybackSpeed(2.0)

local playbackSpeed = GetTelemetryPlaybackSpeed()
local playbackSpeedText = FormatString("{0}x", playbackSpeed)
```

## Requirements

Tacview 2.0.0 or later

## See also

* [GetTelemetryPlaybackSpeed()](/tacview-2-documentation/api-reference/api-reference/playback-control/get-telemetry-playback-speed.md)
* [StartTelemetryPlayback()](/tacview-2-documentation/api-reference/api-reference/playback-control/start-telemetry-playback.md)
* [PauseTelemetryPlayback()](/tacview-2-documentation/api-reference/api-reference/playback-control/pause-telemetry-playback.md)
* [RewindTelemetryPlayback()](/tacview-2-documentation/api-reference/api-reference/playback-control/rewind-telemetry-playback.md)
* [GetTelemetryPlaybackState()](/tacview-2-documentation/api-reference/api-reference/playback-control/get-telemetry-playback-state.md)
* [FormatString()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-string.md)
