Presentation Events
Built-in authoring reference for Mercury 1.0.1. All events.
Animation End
Runs when the current animation clip reaches its end.
Reference key: animationEnd.
Editor category: Presentation > Animation, Cutscenes, and Timelines.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Cutscene Ended
Runs when a cutscene finishes (or is skipped — the end state still lands). Filter = which cutscene; blank matches any.
Reference key: cutsceneEnd.
Editor category: Presentation > Animation, Cutscenes, and Timelines.
Example: On Cutscene Ended [Intro], set $introSeen and open the gates.
Object inputs: self.
Filter (Cutscene (blank = any)): Select the Cutscene name whose completion should activate this Event.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Draw
Runs when the instance should draw custom visuals or UI text.
Reference key: draw.
Editor category: Presentation > Drawing.
Example: Use Draw for quick or debug readouts drawn every frame; for persistent score, lives, or health UI, add a UI Object instead.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Draw Begin
Runs at the start of the custom draw phase, before regular Draw events.
Reference key: drawBegin.
Editor category: Presentation > Drawing.
Example: Use Draw Begin to set shared draw state before other draw rules.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Draw End
Runs at the end of the custom draw phase.
Reference key: drawEnd.
Editor category: Presentation > Drawing.
Example: Use Draw End for last-pass overlays after other draw rules.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Draw GUI
Runs after regular Draw events for screen-fixed UI drawing.
Reference key: drawGui.
Editor category: Presentation > Drawing.
Example: Use Draw GUI for final screen-fixed controls or labels.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
This Event exposes no additional context fields. Configure its filter and Object inputs where offered; a missing field is not an implicit zero-valued output.
Timeline Ended
Runs when a once-mode Timeline finishes playing (looping timelines never end — stop them). Filter = which timeline; blank matches any.
Reference key: timelineEnded.
Editor category: Presentation > Animation, Cutscenes, and Timelines.
Example: On Timeline Ended [DoorOpen], enable the doorway trigger.
Object inputs: self, other.
Filter (Timeline (blank = any)): Select the Timeline name whose completion or loop should activate this Event.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
Event context
| Field | Type | Description |
|---|---|---|
| otherName | thing:object | Object resource of the other participant. This identifies the reusable definition; use the Event Object input to target the live participant. |
| otherInstance | instance | Live instance supplied by this Event. Use this typed handle to target the participant or store it in an Instance Variable; an Object resource name identifies its reusable definition instead. The handle can be empty when no participant is supplied. |
| otherId | text | Runtime instance identifier of the other participant. Distinguishes placements of the same Object; blank when no participant is supplied. |
| timeline | thing:timeline | Timeline resource that ended or completed a loop. Use the Event type to distinguish completion from repetition. |
Timeline Looped
Runs each time a loop or pingpong Timeline completes a full cycle (a pingpong cycle is out AND back). Filter = which timeline; blank matches any.
Reference key: timelineLooped.
Editor category: Presentation > Animation, Cutscenes, and Timelines.
Example: On Timeline Looped [Patrol], add 1 to $laps.
Object inputs: self, other.
Filter (Timeline (blank = any)): Select the Timeline name whose completion or loop should activate this Event.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
Event context
| Field | Type | Description |
|---|---|---|
| otherName | thing:object | Object resource of the other participant. This identifies the reusable definition; use the Event Object input to target the live participant. |
| otherInstance | instance | Live instance supplied by this Event. Use this typed handle to target the participant or store it in an Instance Variable; an Object resource name identifies its reusable definition instead. The handle can be empty when no participant is supplied. |
| otherId | text | Runtime instance identifier of the other participant. Distinguishes placements of the same Object; blank when no participant is supplied. |
| timeline | thing:timeline | Timeline resource that ended or completed a loop. Use the Event type to distinguish completion from repetition. |
UI Activated
Runs on this UI Object when the player activates its button or confirms one of its menu rows. event.index, event.row, and event.table describe a confirmed menu choice.
Reference key: hudActivated.
Editor category: Presentation > UI.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
Event context
| Field | Type | Description |
|---|---|---|
| element | thing:object | Object resource of the UI element that raised the activation Event. |
| index | number | Selected item index supplied by a list or table UI element. The first item has index 0; non-list activations do not identify a selected item. |
| row | text | Selected row key supplied by the UI element. Blank when the activation has no table row. |
| table | thing:data | Data Table used by the activated UI element. Blank when no table is associated with the element. |
UI Value Changed
Runs on this UI Object when its live binding changes after the first sample. event.value and event.previousValue contain typed snapshots of the new and previous values.
Reference key: hudValueChanged.
Editor category: Presentation > UI.
Object inputs: self.
Event context is a read-only snapshot for this invocation. It is available in the Event’s Action fields; store a required value in a declared Variable before using it in another Event.
Event context
| Field | Type | Description |
|---|---|---|
| element | thing:object | Object resource of the UI element whose value changed. |
| value | mixed | Value after the UI edit. The value type depends on the UI element; it is not always numeric. |
| previousValue | mixed | Value before the UI edit, in the same representation as Current Value. |
Myth Engine Documentation
