> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionratio.md).

# npc.motionratio

```lua
npc.motionratio(ratio)
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x00E6`                         |
| arguments               | 1: Float                         |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 710 calls in 164 of 1114 scripts |

## What it does

Sets how fast the NPC's motion plays, as a multiple of its own rate: `1` normal, `0` frozen.

## Arguments

### `ratio` (Float)

The speed. Vanilla: `1` (204 calls), `0` (131), `1.2`, `0.8`, `0.5`, `0.7`, `1.5`.

## Timing

Returns at once; applies to the motion playing.

## In NPC Kit

A slowed gesture or a freeze-frame in a scene: `npc.motionratio(0.5)`, and `motionratio(1)` after. Not tested on a kit NPC's standard motions.

## Used with

* [stdmotionplay\_2c2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionplay_2c2.md).

## Example

A gesture played at half speed in a beat, back to normal after.

```lua
slowNod = function()
    npc.motionratio(0.5);
    npc.stdmotionplay_2c2(0x01000014, 20);   -- yes
    npc.wait(80);
    npc.motionratio(1);
    npc.stdmotionplay_2c2(0x01000002, 20);
end,
```

## Pitfalls

* Not tested on standard motions; set `1` back at the end of the beat all the same.
