Aego Русский

Events

Events are declared in Project Settings → Animation, or in project.aego:

animation {
  event "Hit" payload=float {}
  event "Footstep" {}
}

Footstep and Hit (payload float) are declared by the engine for its built-in clips; a project may use them without declaring them.

An event in a clip has a mode:

Mode When it runs
gameplay (default) on the fixed step that crosses it, once per cycle, the same on every replay
presentation when the drawn time crosses it; for sounds and effects; not during a replay
preview only in the editor's preview

The scripts of the player's node get OnAnimEvent(id int, payload float), and the player emits its Event(id, payload) signal. An event at time 0 runs when the clip starts and on every new cycle; an event at the end runs once per cycle. A step that covers several cycles runs each event once per cycle, in order. Seek fires nothing.