API ReferenceGE Extensionsflowgraphnodesui
Fade To Black (Flowgraph Node)
- **Node Name:** `Fade To Black`
Overview
- Node Name:
Fade To Black - Category:
once_f_duration - File:
extensions/flowgraph/nodes/ui/fadeToBlack.lua
Fades the screen to black. Completes when the screen is fully black.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
duration | number | 0.75 | Duration of the fade transition (hardcoded) |
Output Pins (inherited from once_f_duration)
| Pin | Type | Description |
|---|---|---|
complete | flow | Fires when the screen is fully black |
Internals
Key Methods
| Method | Description |
|---|---|
workOnce() | Starts the fade via ui_fadeScreen.fadeToBlack(duration) |
onScreenFadeState(state) | Listens for state 1 (fully black) to finish |
_executionStopped() | Resets duration state |
onNodeReset() | Resets duration state |
How It Works
workOnce()sets duration state tostartedand callsui_fadeScreen.fadeToBlack(duration).- When the screen reaches full black,
onScreenFadeState(1)fires and sets the duration tofinished. - The
completeoutput flow pin activates, allowing downstream nodes to proceed.
Usage Example
-- Typical pattern: fade to black, do something, fade from black
-- [Trigger] → [Fade To Black] → [Teleport Vehicle] → [Fade From Black]
--
-- Internally calls:
ui_fadeScreen.fadeToBlack(0.75)Key Dependencies
ui_fadeScreen.fadeToBlack()- performs the actual screen fadeonScreenFadeStatehook - state 1 = fully black
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide