> 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/motionstartframe.md).

# npc.motionstartframe

```lua
npc.motionstartframe(frame)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x00F5`                          |
| arguments               | 1: Float                          |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 6977 calls in 352 of 1114 scripts |

## What it does

Sets the frame the NPC's next motion starts at, instead of its first.

## Arguments

### `frame` (Float)

The starting frame; a negative value counts as 0. Vanilla: `0` (2,554 calls), `30`, `60`, `10`, `50`, `20`.

## Timing

Returns at once; it applies to the motion played after it.

## In NPC Kit

Vanilla uses it in scene scripts with `motionplay`, which a kit NPC can't play (no map motions). With the standard motions of `stdmotionplay_2c2` it is not confirmed to apply.

## Used with

* [motionloopframe](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionloopframe.md), [motionloop](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionloop.md), then [motionplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionplay.md) in vanilla.

## Example

The vanilla shape: start the next motion on frame 30 instead of its first. Not confirmed to apply to standard motions; check it in the game.

```lua
midLaugh = function()
    npc.motionstartframe(30);
    npc.stdmotionplay_2c2(0x01000013, 0);
    npc.motionsync_282(1);
    npc.stdmotionplay_2c2(0x01000000, 20);
end,
```
