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

# npc.motionclear

```lua
npc.motionclear()
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x016B`                         |
| arguments               | 0                                |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 436 calls in 155 of 1114 scripts |

## What it does

Stops the NPC's motion, like [motioncancel](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motioncancel.md), and also resets the model's bones on the next frame, so no pose of the stopped motion is left on the body.

## Timing

Returns at once; the bone reset happens on the next frame.

## In NPC Kit

A press in the editor's Motion group.

## Used with

* [motioncancel](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motioncancel.md): vanilla often runs both, `motionclear` first.
* [attach](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/attach.md), [attachoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/attachoff.md), [setpos](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setpos.md): vanilla clears the motion right before attaching an actor or placing it again, so the new place starts from a clean body.
* [motionplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionplay.md), [stdmotionplay\_2c2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionplay_2c2.md): the next motion.

## Example

The NPC drops whatever it was doing and is placed again for the next scene.

```lua
reset = function()
    npc.motionclear();
    npc.setpos(91.3, 0, 130.0);
    npc.dir(1.676);
    npc.stdmotionplay_2c2(0x01000000, 0);   -- back to the idle
end,
```

## Pitfalls

* With no motion after it the NPC stands in its bare model pose: play the idle again.
