API ReferenceGE Extensionsflowgraphnodesui
Flash Message (Flowgraph Node)
- **Node Name:** `Flash Message`
Overview
- Node Name:
Flash Message - Category: (has
durationbehaviour, pass-through flow) - File:
extensions/flowgraph/nodes/ui/flashMessage.lua
Shows a temporary message in the middle of the screen. Requires the "UI Layout" node to be set up for messages to be visible.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
flow | flow | - | Inflow |
instant | bool | - | If true, clears all previous messages first (hidden) |
message | any | - | Message to display (string or table) |
duration | number | 3 | Display duration in seconds |
biggerText | bool | true | Show message in larger size (hidden) |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Passes through input flow |
Internals
Key Methods
| Method | Description |
|---|---|
init() | Loads scenario/scenariohelper |
work() | Optionally clears messages, then calls scenariohelper.flashUiMessage() |
How It Works
- On each trigger, if
instantis true, clears existing messages viaguihooks.trigger('ScenarioFlashMessageClear'). - Converts the message to string if it's not a table.
- Calls
scenariohelper.flashUiMessage(msg, duration, biggerText)to display it. - Passes flow through immediately (non-blocking).
Usage Example
-- Display a message for 5 seconds:
-- Connect: message = "Checkpoint reached!", duration = 5
-- Under the hood:
local helper = require('scenario/scenariohelper')
helper.flashUiMessage("Checkpoint reached!", 5, true)
-- To clear and show instantly:
guihooks.trigger('ScenarioFlashMessageClear')
helper.flashUiMessage("GO!", 3, true)Key Dependencies
scenario/scenariohelper-flashUiMessage()functionguihooks.trigger('ScenarioFlashMessageClear')- clears queued messages
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide