# Open77.character — client runtime

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

18 functions.

## animation

```lua
Open77.character.animation([entity])
```

`GAME` — Requires a live game instance.

The animation currently playing on this character.

Reads the current animation snapshot for an entity, or for the local player when omitted. The result is observational and can change on the next frame; it does not grant animation ownership.

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

Returns: `clip name, or nil`

Registered in `ResourceHost.cpp` (line 6750) as `LuaCharacterAnimation`.

## groundSpeed

```lua
Open77.character.groundSpeed([entity])
```

`GAME` — Requires a live game instance.

Speed projected on the ground, without the vertical component.

Returns horizontal movement speed for the selected character, excluding vertical velocity. Entity ids refer to the current client stream and must not be persisted as server identity.

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

Returns: `number`

Registered in `ResourceHost.cpp` (line 6752) as `LuaCharacterNumber<&SelectGroundSpeed>`.

## health

```lua
Open77.character.health([entity])
```

`GAME` — Requires a live game instance.

Current health.

Reads the engine-side health visible for the selected character on this client. For replicated player gameplay rules use the server-authoritative player health APIs; this helper is a presentation snapshot, not authority.

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

Returns: `number`

Registered in `ResourceHost.cpp` (line 6753) as `LuaCharacterNumber<&SelectHealth>`.

## isAlive

```lua
Open77.character.isAlive([entity])
```

`GAME` — Requires a live game instance.

Whether the character is alive.

Reports the current engine alive/dead flag for the selected character. It is useful for presentation and diagnostics but may lag the authoritative server health transition by a replication frame.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6755) as `LuaCharacterFlag<&SelectAlive>`.

## isArmed

```lua
Open77.character.isArmed([entity])
```

`GAME` — Requires a live game instance.

Whether a weapon is drawn.

Reports whether the selected character is currently considered armed by the game presentation state. It does not enumerate inventory or prove that a weapon action is server-authorized.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6760) as `LuaCharacterFlag<&SelectArmed>`.

## isCrouched

```lua
Open77.character.isCrouched([entity])
```

`GAME` — Requires a live game instance.

Whether the character is crouching.

Reads the character's current crouch presentation flag. Omit the entity to inspect the local player; remote values exist only while that proxy is streamed.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6757) as `LuaCharacterFlag<&SelectCrouched>`.

## isDriver

```lua
Open77.character.isDriver([entity])
```

`GAME` — Requires a live game instance.

Whether they occupy the driver's seat.

Returns whether the selected character occupies the canonical driver seat of a vehicle. Use `seat()` when the exact seat and vehicle entity are also needed.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6762) as `LuaCharacterFlag<&SelectDriverSeat>`.

## isEmoting

```lua
Open77.character.isEmoting([entity])
```

`GAME` — Requires a live game instance.

Whether they hold a workspot (an emote is running).

Reports whether Open77 currently presents the character in an emote/workspot state. This is a transient local snapshot and is cleared with the owning presentation lifecycle.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6763) as `LuaCharacterFlag<&SelectInWorkspot>`.

## isGrounded

```lua
Open77.character.isGrounded([entity])
```

`GAME` — Requires a live game instance.

Whether the character is touching the ground.

Reads the engine grounded flag for the selected character. The value is sampled from the current client frame and should not be used alone for authoritative movement validation.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6756) as `LuaCharacterFlag<&SelectGrounded>`.

## isInVehicle

```lua
Open77.character.isInVehicle([entity])
```

`GAME` — Requires a live game instance.

Whether the character is mounted in a vehicle.

Reports whether the character is mounted in a vehicle according to the current client presentation. Call `seat()` to retrieve the mounted slot and vehicle entity id.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6761) as `LuaCharacterFlag<&SelectInVehicle>`.

## isSliding

```lua
Open77.character.isSliding([entity])
```

`GAME` — Requires a live game instance.

Whether the character is sliding.

Reads the current sliding locomotion flag for the selected character. It is an observational state and does not start or stop a slide.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6758) as `LuaCharacterFlag<&SelectSliding>`.

## isVaulting

```lua
Open77.character.isVaulting([entity])
```

`GAME` — Requires a live game instance.

Whether the character is vaulting.

Reads the current vaulting locomotion flag for the selected character. Remote values are available only while the corresponding proxy is streamed.

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

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6759) as `LuaCharacterFlag<&SelectVaulting>`.

## position

```lua
Open77.character.position([entity])
```

`GAME` — Requires a live game instance.

The character's position.

Returns the character's current world-space coordinates from the game-thread snapshot. Omit the entity for the local player; do not persist a client entity id as a network identity.

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

Returns: `x, y, z`

Registered in `ResourceHost.cpp` (line 6747) as `LuaCharacterPosition`.

## seat

```lua
Open77.character.seat([entity])
```

`GAME` — Requires a live game instance.

The seat occupied in a vehicle, if any.

Returns the canonical seat name and the mounted vehicle's client entity id when the character is in a vehicle. A character that is not mounted returns `nil`; both values are snapshots and the entity id is valid only in the current client stream.

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

Returns: `seat name and vehicle entity id, or nil`, `reason when the character could not be read`

Registered in `ResourceHost.cpp` (line 6748) as `LuaCharacterSeat`.

## speed

```lua
Open77.character.speed([entity])
```

`GAME` — Requires a live game instance.

Instantaneous speed, all components.

Returns total character movement speed, including vertical motion, from the latest local snapshot. Use `groundSpeed()` when only horizontal locomotion is relevant.

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

Returns: `number`

Registered in `ResourceHost.cpp` (line 6751) as `LuaCharacterNumber<&SelectSpeed>`.

## state

```lua
Open77.character.state([entity])
```

`GAME` — Requires a live game instance.

One complete snapshot of a character.

A single engine pass fills the whole record even when the caller only wanted the speed. That is deliberate: every field then describes the **same instant**, so a caller cannot see a body grounded and airborne in the same breath.

With no argument, answers about the local player.

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

Returns: `table { isPlayer, attached, id, engineId, position, orientation, forward, velocity, speed, groundSpeed, yaw, alive, health, grounded, crouched, sliding, vaulting, air, fall, landing, weapon…, inVehicle, seat, driver }`, `reason, when the first is nil`

```lua
local s = Open77.character.state()
if s.inVehicle and s.driver then
    print("driving at " .. math.floor(s.speed) .. " u/s")
end
```

Registered in `ResourceHost.cpp` (line 6746) as `LuaCharacterState`.

## weapon

```lua
Open77.character.weapon([entity])
```

`GAME` — Requires a live game instance.

The equipped weapon and its state.

Returns the drawn weapon's recognized item id and category for the selected character. It returns `nil` when no recognized weapon is currently presented and does not expose or mutate inventory.

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

Returns: `table { itemId, category }, or nil`, `reason when the character could not be read`

Registered in `ResourceHost.cpp` (line 6749) as `LuaCharacterWeapon`.

## yaw

```lua
Open77.character.yaw([entity])
```

`GAME` — Requires a live game instance.

Horizontal orientation, in degrees.

Returns the selected character's current world yaw in degrees. The value is a presentation snapshot and should be normalized by the caller when computing angular deltas.

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

Returns: `number`

Registered in `ResourceHost.cpp` (line 6754) as `LuaCharacterNumber<&SelectYaw>`.

