# setCinematicActorTiming (Client)

> Places an actor's take in the cinematic's time, trims the part shown and sets its speed. Outside that part the actor leaves the scene.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Cinematics
- **URL**: https://wiki.mymp.gg/en/setCinematicActorTiming

## Syntax

```lua
bool setCinematicActorTiming(cinematic cinematic, string slot, table timing)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |
| `slot` | `string` | The name of a recorded actor. |
| `timing` | `table` | A table with `at`, `start`, `stop` and `speed`, all optional. |

## Returns

`true` if it was applied. `false` if the actor does not exist or the table is invalid, with a warning saying why.

The fields, in cinematic ms:

- `at`: where the take's own 0 plays. May be negative. Without it, the current one stays.
- `start`: from when the actor is shown. Without it, the current one stays.
- `stop`: when the actor leaves. Without it or `0`, at the end of the take.
- `speed`: take time per cinematic time, from 0.1 to 10. The actor's animations play at it too. Without it, the current one stays.

The take must show part of what it recorded and show after the cinematic starts. During playback, the change applies at once.

## Example

```lua
local intro = createCinematic("cinematics/intro.cine")
setCinematicActorTiming(intro, "hero", { at = 2000, start = 3000, stop = 12000, speed = 0.5 })
```

## See also

- [getCinematicActors (Client)](https://wiki.mymp.gg/en/getCinematicActors.md): Lists the cinematic's actors: the recorded ones and the placed ones.
- [setCinematicAdjustments (Client)](https://wiki.mymp.gg/en/setCinematicAdjustments.md): Lays shifts and animations over an actor's take. The take stays as recorded and moves with them. It replaces the actor's earlier adjustments.
- [startCinematicRecording (Client)](https://wiki.mymp.gg/en/startCinematicRecording.md): Starts recording a ped, player or vehicle as an actor of the cinematic. Called again while it records, it adds another actor to the same recording.
