> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmentities.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Animation

> Play and stop a model's animations from an effect line.

Plays an animation from your Blockbench model on any trigger — a wind-up before an attack, a roar on spawn, a stagger when hurt.

```yaml theme={null}
- animation{name=roar;loop=once} +onSpawn @self
- animation{name=slam;loop=once;speed=1.5} +onAttack @self
- stopanimation{name=walk} +onDeath @self
```

## animation

**Aliases:** `anim`, `playanimation`, `playanim`, `state`, `mstate`, `modelstate`

| Attribute | Aliases                                | Default                   | Description                                                                              |
| :-------- | :------------------------------------- | :------------------------ | :--------------------------------------------------------------------------------------- |
| `name`    | `a`, `anim`, `animation`, `s`, `state` | —                         | The animation, as named in the `.bbmodel`. Also accepted positionally: `animation roar`. |
| `loop`    | `type`, `mode`                         | the animation's own       | `once`, `loop` or `hold`.                                                                |
| `speed`   | `sp`                                   | `1`                       | Playback multiplier.                                                                     |
| `model`   | `m`, `mid`                             | every model on the target | Restrict it to one model, for an entity wearing more than one.                           |
| `lerpin`  | `blendin`, `li`, `start`               | `0`                       | Ticks blended in at the start.                                                           |
| `lerpout` | `blendout`, `lo`, `end`                | `0`                       | Ticks blended out at the end.                                                            |

## stopanimation

**Aliases:** `stopanim`, `animationstop`

Takes `name` (same aliases) and the optional `model`. Ends that animation on the targets.

## Coming from Model Engine

Model Engine's spelling of the same thing parses unchanged. `state{s=attack}` is `animation{name=attack}`, and `li`/`lo` are its names for the blend windows — so its skill lines can be pasted in as they are.

## Notes

* Targets with no model are skipped silently. There is nothing to animate on a model-less mob.
* An animation the model does not have is a no-op, so a typo shows up as nothing happening rather than as an error at load time. `/nme test <mob> <animation>` autocompletes the real names.
* The [`/nme test`](test-model) command plays an animation once without setting up an effect, which is the fastest way to preview one.
* Models are attached **before** `+onSpawn` effects run, so playing an animation when a mob appears works.
* Under the hood this is the engine's own animation API, which an addon can drive directly with far more control — priorities, per-player animations, predicates. See [Models & Animation](addon-models#animations).
