# Animation

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

The `animation` block of `project.aego`, owned by the Animation module.

## Animation events

Declare project-specific animation event names in the `animation` block. `Footstep` and `Hit` are built in; redeclaring either does not replace the built-in event. Each project event needs a unique, nonempty name. `payload` is optional and can be `none`, `int`, `float` or `bool`; its default is `none`.

```aetext
animation {
  event "Land" payload=float {}
  event "OpenDoor" {}
}
```

In **Project Settings → Animation**, add, rename or remove project events and choose their payload. Changes stay in the settings draft until **Apply**; Undo and Redo work on that draft. The new declarations take effect on the next Play. Renaming or removing a declaration does not rewrite animation clips: update their event names too.

Animation clips refer to these names. Scripts receive `OnAnimEvent(id, payload)` and can resolve names with `anim.EventName` and `anim.EventID`; see [Animation events](/animation/events.md). The same block can also be edited in `project.aego`.
