What’s New
Getting Started

Event Nodes

Last Updated: November 2, 20242.8 min read

Overview

Event nodes in Sceneri’s Logic Graph are essential for triggering and managing actions within your game. These nodes handle the flow of events by initiating processes, pausing or stopping them, and managing execution flow based on game-specific logic. Understanding these nodes allows developers to control when and how actions occur, making them crucial for building interactive gameplay. This article provides an overview of Sceneri’s event nodes, describing each one’s functionality and common use cases.

Available Event Nodes

Begin

  • Description: The Begin node triggers once at the start of a specific script or when an entity is initialized. This node is commonly used to set up initial states and conditions.
  • Use Cases: Ideal for setting initial values, preparing resources, or initiating animations or sounds that should play when an entity or scene begins. Use it to establish a setup phase before main gameplay starts.

Tick

  • Description: The Event Tick node triggers an event at every frame update, making it a continuous loop that runs throughout the game’s active state.
  • Use Cases: Useful for tasks that need to be updated constantly, such as checking player position, applying movement or physics calculations, or updating UI elements like health bars. Be mindful of performance, as frequent updates can impact resource usage.

Break

  • Description: The Break node is used to interrupt a loop or sequence, allowing you to exit the flow prematurely based on a specific condition.
  • Use Cases: Typically used in loops like While or For Each to stop the loop when a certain condition is met, such as finding a target or achieving a goal. This can optimize logic by preventing unnecessary iterations once the desired outcome is achieved.

Block

  • Description: The Block node is designed to temporarily hold or “block” the flow of execution until a specified condition is met. It pauses execution and waits until it receives a signal to continue.
  • Use Cases: Useful for creating pauses or delays in your logic flow, such as waiting for a player to complete an action or reach a certain point in the game. Block nodes can help synchronize actions or maintain timing in cutscenes or animations.

Return

  • Description: The Return node ends the execution of a script or function and can optionally pass back a value. This is particularly useful in scripts where a specific result or exit condition is required.
  • Use Cases: Commonly used in custom functions or logic sequences where an early exit might be needed. For example, if a condition is met halfway through a sequence, the Return node can terminate the process, often sending back relevant data to another part of the graph.

Conclusion

Event nodes in Sceneri are instrumental for managing game flow and responsiveness. Nodes like Event Tick, Begin, Break, Block, and Return provide essential control over when and how actions take place, enabling you to create dynamic, interactive gameplay. By using these event nodes effectively, developers can achieve precise timing, condition-based execution, and efficient looping structures, which are key to creating smooth and engaging experiences in Sceneri.

Feedback

Please be sure to submit issues or feature requests through the embedded feedback form. In the event it is a major issue please contact us directly through Discord.