Skip to content
Documentation

Lifecycle Events

Built-in authoring reference for Mercury 1.0.1. All events.

Activated

Runs after this Object changes from inactive to active.

Reference key: activated.

Editor category: Lifecycle > Object Lifecycle.

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.

Begin Step

Runs at the start of each game step, before regular Step events.

Reference key: beginStep.

Editor category: Lifecycle > Update Loop.

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.

Create

Runs once when an instance is created.

Reference key: create.

Editor category: Lifecycle > Object Lifecycle.

Example: Use Create to give a coin its first random position or set an enemy initial speed.

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.

Deactivated

Runs once as this Object changes from active to inactive.

Reference key: deactivated.

Editor category: Lifecycle > Object Lifecycle.

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.

Destroy

Runs when an instance is destroyed.

Reference key: destroy.

Editor category: Lifecycle > Object Lifecycle.

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.

End Step

Runs at the end of each game step, after regular Step events.

Reference key: endStep.

Editor category: Lifecycle > Update Loop.

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.

Game End

Runs when the game ends.

Reference key: gameEnd.

Editor category: Lifecycle > Scene and Game.

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.

Game Start

Runs once when the game starts.

Reference key: gameStart.

Editor category: Lifecycle > Scene and Game.

Example: Use Game Start to set global variables before the first scene appears.

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.

No Instances Left

Runs on every listener when the last live instance of the selected Object is destroyed. A parent Object counts its children, so “Rock” means no Large, Medium, or Small rocks are left.

Reference key: noInstancesLeft.

Editor category: Lifecycle > Object Lifecycle.

Example: On No Instances Left [Rock] → Wait 2 seconds, then start the next wave.

Object inputs: self.

Filter (Object): Select the Object definition relevant to this Event. Collision filters select the other participant; the Event Object input identifies its live occurrence.

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.

On Disable

Runs once after this Logic changes from enabled to disabled. It still runs for this transition even though the Logic is now disabled.

Reference key: behaviorDisabled.

Editor category: Lifecycle > Logic Lifecycle.

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.

On Enable

Runs once after this Logic changes from disabled to enabled. It does not run when an instance is first created.

Reference key: behaviorEnabled.

Editor category: Lifecycle > Logic Lifecycle.

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.

Scene End

Runs when the scene is about to end.

Reference key: sceneEnd.

Editor category: Lifecycle > Scene and Game.

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.

Scene Start

Runs when the scene starts.

Reference key: sceneStart.

Editor category: Lifecycle > Scene and Game.

Example: Use Scene Start to reset scene-specific state or start music.

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.

Step

Runs every game step while the instance exists.

Reference key: step.

Editor category: Lifecycle > Update Loop.

Example: Use Step for Logic that must update continuously while the instance exists.

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.

Myth Engine Documentation