Event Node

Overview

The Malbers Event Node invokes a Malbers MEvent ScriptableObject asset during a dialogue sequence, then immediately advances to the next node. It is a fire-and-forget node — no waiting occurs, and dialogue flow continues the moment the event is invoked.

MEvent is the Malbers global event system. Any listeners subscribed to the event asset at runtime — across any scene object — will receive the invocation. This makes the node the primary bridge between the dialogue graph and the rest of the Malbers ecosystem, covering anything from triggering animations and enabling objects to updating UI or notifying gameplay systems.

The node's title updates automatically to display the name of the assigned event asset.


Ports

Port
Direction
Capacity
Description

Previous

Input

Multi

Receives connections from any preceding node.

Next

Output

Single

Advances to the next node immediately after the event is invoked.


Node Properties

Property
Type
Description

Event Asset

MEvent

The Malbers MEvent ScriptableObject to invoke. All runtime listeners subscribed to this asset will be notified.


How It Works

At runtime, DialogueManager checks whether the assigned MEvent asset is not null, then calls MEvent.Invoke(). All listeners that have subscribed to that event asset via MEventListener components or direct API calls will receive the call immediately.

The node then calls AdvanceToNextNode() without waiting. If no MEvent is assigned, a warning is logged and the graph advances anyway — nothing is invoked but the dialogue continues.


Validation

Condition
Severity

Next output port is not connected

Error

No error or warning is shown in the graph editor for a missing Event Asset — this is caught at runtime with a warning log. Ensure your event asset is assigned before shipping.


Usage Tips

  • Anything Malbers can do, this node can triggerMEvent listeners can invoke UnityEvents, toggle objects, call methods, set variables, play sounds, and more. If it can be wired up in a Malbers MEventListener, it can be triggered from a dialogue graph.

  • Chain multiple events — place several Malbers Event Nodes back-to-back if you need to fire multiple independent events in sequence within the same dialogue flow.

  • NPC state changes — use this to enable or disable NPC components, swap materials, or trigger Quest system events that don't require the full QuestNode setup.

  • No waiting — because the node advances immediately, it is not suitable for events that kick off a process you need to wait for (e.g. a long animation triggered via MEvent). In that case, use the Malbers Character Action Node with Wait for Completion, or follow this node with a Wait Node of appropriate duration.

  • Event asset must be the same instanceMEvent listeners subscribe to a specific ScriptableObject asset by reference. Make sure the asset assigned here is the exact same asset that your MEventListener components reference in the scene.

Last updated