API ReferenceGE Extensionsflowgraphnodesui
Message (Flowgraph Node)
- **Node Name:** `Message`
Overview
- Node Name:
Message - Category: (default, duration behaviour)
- File:
extensions/flowgraph/nodes/ui/message.lua
Shows a message in the small message app (toast-style notification). Uses guihooks.trigger('Message', ...) to display.
Pin Schema
Input Pins
| Pin | Type | Default | Hidden | Description |
|---|---|---|---|---|
flow | flow | - | no | Inflow for this node |
message | any | - | no | The message to display. Bug: cannot start directly with a number |
duration | number | 5 | no | Duration of display in seconds |
category | string | "flowgraph" | no | Category - only one message per category can be displayed |
icon | string | "info" | yes | Material icon name for the message |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Passes through input flow |
Internals
| Field | Purpose |
|---|---|
self._timer | Rate-limits message triggers (pulses every 0.05s) |
self.underscoreIdCache | Cached "__" .. self.id for default category |
helper | Reusable table for message data sent to guihooks |
How It Works
_executionStarted()- Resets timer and caches the node ID string.work()- Called every frame while flow is active:- When
_timer <= 0, builds a message table withclear,ttl,msg,category, andiconfields. - Triggers
guihooks.trigger('Message', helper)to show the toast. - Resets the pulse timer to prevent spamming (0.05s interval).
- Passes flow through to output.
- When
_afterTrigger()- Resets timer when flow stops.drawCustomProperties()- Adds an "Open Icons overview" button in the editor.
If message is nil, the helper sets clear = true to dismiss the current message.
Lua Code Example
-- Direct equivalent of what this node does:
guihooks.trigger('Message', {
msg = "Hello World!",
ttl = 5,
category = "myCategory",
icon = "info",
clear = false,
})Key Dependencies
guihooks.trigger('Message', data)- BeamNG UI message toast systemui_flowgraph_editor- Node color/icon constants
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide