Events
Events
An event is a named signal that an animation sends to the game at a chosen moment. It draws nothing and moves nothing. It tells the game code that something happened: a foot touched the ground, a sword hit, a door opened. The game listens for the name and reacts, for example by playing a sound, spawning dust or counting a step. This article explains how an event is defined once and fired many times, how to create an event, what its Int, Float, String and audio values are, how to place an event on the timeline in Animate, how to give one firing its own values, and how to see events while you play.

Definition and key#
An event has two parts. The definition is made once for the skeleton: it has a name and optional default values, and it lives in the Events branch of the Tree. A key is a single firing of that event at a time in one animation. Each animation can fire the same event as many times as it needs. A walk cycle has a footstep key for the left foot and another for the right foot, both pointing at the same footstep definition.
When the game plays the animation and the time of a key is reached, it gets the name of the event with its values, and runs whatever code is attached to that name. Ligamen does not decide what an event means. It only stores the names, the times and the values.
Creating an event#
Right-click the Events branch in the Tree and choose New Event, or right-click an existing event and choose the same entry. A new event is named event, event2 and so on, and is selected at once. The creation is one undo step. If you right-click a folder inside the Events branch, the event is created inside it; the folder is a prefix of the name, such as foot/event, and helps to keep a long list in order. Press F2 to rename an event, and the keys in every animation follow the new name. Duplicate Event copies the definition with its values. Deleting an event removes its keys from all animations.
To make an event for a sound, use the audio file in the Audio branch of the Tree and choose its New Event entry. Ligamen creates an event that already points to that file, and the status line reports it.
The values of an event#
Select the event in the Tree. Properties has an Event section with six fields. Int is a whole number, Float is a decimal number and String is a text, and the game receives all three with every firing. They are free for your own use: a Float can carry the strength of a footstep, a String the name of a surface such as grass. The default for each number is 0.
Audio is the path of a sound file that the editor plays when the event fires, so you can hear the timing while you work. Volume goes from 0 to 10 with 1 as the default, and Balance goes from -1 for the left channel to 1 for the right one. The editor plays the file only for its preview; what the game does with the audio path is up to the game. The values on the definition are the defaults for every key of the event.
Placing events on the timeline#
Events are keyed in Animate. Choose an animation, select the event in the Tree, move the playhead to the frame and press K. A key is added to the Events row of the Dopesheet, and Properties shows that the event is keyed at this frame. Pressing K again on the same frame writes the key anew and removes the per-key values described below. The Delete key action at the playhead removes the key. In the Dopesheet the keys are moved, copied and pasted like the keys of any other timeline (see Keys).
An event has no value that changes between keys, so there is no curve and no interpolation: the event fires once when the time reaches the key. A key at the very first frame fires when the animation starts. In a looped animation, the events fire again on every loop.
Values of a single firing#
A key can carry its own values instead of the defaults. Place the playhead exactly on a key, select the event and change a field in Properties. With Auto Key on, the change is written into that key at once, and only that firing is changed: the second footstep can have a different Float, a different String or another Audio. The definition and the other keys keep their values. Without a key at the playhead, the same edit changes the definition itself, and nothing is keyed: an event never starts a key by editing a field.
With Auto Key off, an edit on a keyed frame is held back: the key indicator reads dirty, and K writes the held values into the key. Fields that you did not change keep the value of the definition.
Seeing and hearing events#
While the playhead moves in Animate, whether by playback or by scrubbing, the names of the events that have just fired flash above the skeleton in the viewport and fade out. They do not show in Setup, and not on a paused clip that you did not move. If the name is a distraction, hide the event with its visibility dot in the Tree: the flash goes, and an audio event also leaves the Audio panel. Hiding is a view setting, it is saved with the project and has no undo, and it does not remove the keys or silence the sound during playback.
The Audio panel lists the events that have an audio file, with the master Mute and Volume. During playback the sound of an event plays when its key is reached, with the key's own values if it has them. When you scrub by hand, the sound stays quiet, and this is deliberate.
Events in exports#
Events are exported with the skeleton: the definitions and every key with its time and values go to .ligamen, to Spine JSON, to the binary skeleton and to the Unity package. Names are kept exactly, so they are a contract with the game code: renaming an event after the game started to listen for it breaks the connection. Use short stable names such as footstep, hit or spawn, and carry the variations in the Int, Float and String values.