# Open77.animations — client runtime

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

5 functions.

## current

```lua
Open77.animations.current(entity)
```

`GAME` — Requires a live game instance.

The clip a body is currently playing.

Returns false when it is playing nothing — which is a state, not an error.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |

Returns: `clip name, or false`, `reason, when applicable`

Registered in `ResourceHost.cpp` (line 6720) as `LuaAnimationCurrent`.

## play

```lua
Open77.animations.play(entity, animation)
```

`GAME` — Requires a live game instance.

Plays a named animation on a body.

Does not work on the local player: their body cannot hold a workspot. Use `Open77.animations.playSelf` for that, which stands a double in for them.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |
| `animation` | `string` | required | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

```lua
local ok, reason = Open77.animations.play(entityId, "emote_smoke")
if not ok then print("refused: " .. reason) end
```

Registered in `ResourceHost.cpp` (line 6716) as `LuaAnimationPlay`.

## playSelf

```lua
Open77.animations.playSelf(animation, [thirdPerson])
```

`GAME` — Requires a live game instance.

Plays an emote on the local player, through a stand-in body.

The player's own body cannot hold a workspot, so an invisible double takes their place for the length of the clip. This is a separate call rather than `play` with the player's id because the mechanism is genuinely different.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `animation` | `string` | required | — |
| `thirdPerson` | `boolean` | optional | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6717) as `LuaSelfEmotePlay`.

## stop

```lua
Open77.animations.stop(entity)
```

`GAME` — Requires a live game instance.

Stops whatever a body is playing and releases what was set up for it.

Stops the workspot animation currently managed by Open77 for the selected body and releases its native animation state. It does not claim or stop arbitrary game animations that Open77 does not own.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6719) as `LuaAnimationStop`.

## stopSelf

```lua
Open77.animations.stopSelf()
```

`GAME` — Requires a live game instance.

Stops the local player's emote and removes the stand-in.

Ends the local-player emote created by `playSelf` and removes its stand-in body. Cleanup is idempotent and is also performed when the owning resource generation stops.

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6718) as `LuaSelfEmoteStop`.

