# CyberM.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
CyberM.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 6615) as `LuaCharacterAnimation`.

## groundSpeed

```lua
CyberM.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 6617) as `LuaCharacterNumber<&SelectGroundSpeed>`.

## health

```lua
CyberM.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 6618) as `LuaCharacterNumber<&SelectHealth>`.

## isAlive

```lua
CyberM.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 6620) as `LuaCharacterFlag<&SelectAlive>`.

## isArmed

```lua
CyberM.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 6625) as `LuaCharacterFlag<&SelectArmed>`.

## isCrouched

```lua
CyberM.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 6622) as `LuaCharacterFlag<&SelectCrouched>`.

## isDriver

```lua
CyberM.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 6627) as `LuaCharacterFlag<&SelectDriverSeat>`.

## isEmoting

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

`GAME` — Requires a live game instance.

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

Reports whether CyberM 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 6628) as `LuaCharacterFlag<&SelectInWorkspot>`.

## isGrounded

```lua
CyberM.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 6621) as `LuaCharacterFlag<&SelectGrounded>`.

## isInVehicle

```lua
CyberM.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 6626) as `LuaCharacterFlag<&SelectInVehicle>`.

## isSliding

```lua
CyberM.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 6623) as `LuaCharacterFlag<&SelectSliding>`.

## isVaulting

```lua
CyberM.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 6624) as `LuaCharacterFlag<&SelectVaulting>`.

## position

```lua
CyberM.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 6612) as `LuaCharacterPosition`.

## seat

```lua
CyberM.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 6613) as `LuaCharacterSeat`.

## speed

```lua
CyberM.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 6616) as `LuaCharacterNumber<&SelectSpeed>`.

## state

```lua
CyberM.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 = CyberM.character.state()
if s.inVehicle and s.driver then
    print("driving at " .. math.floor(s.speed) .. " u/s")
end
```

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

## weapon

```lua
CyberM.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 6614) as `LuaCharacterWeapon`.

## yaw

```lua
CyberM.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 6619) as `LuaCharacterNumber<&SelectYaw>`.

