API ReferenceGE Extensionsflowgraphnodesui
Fade From Black (Flowgraph Node)
- **Node Name:** `Fade From Black`
Overview
- Node Name:
Fade From Black - Category:
once_f_duration - File:
extensions/flowgraph/nodes/ui/fadeFromBlack.lua
Fades the screen from black back to normal view. Uses the duration-based node pattern with complete output flow when finished.
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 fade finishes |
Internals
Key Methods
| Method | Description |
|---|---|
workOnce() | Starts the fade; if loading screen is active, fades out loading screen instead |
onScreenFadeState(state) | Listens for fade state 3 (complete) to set duration finished |
_executionStopped() | Resets duration state to inactive |
onNodeReset() | Resets duration state to inactive |
Duration States
Uses the standard duration node pattern: inactive → started → finished.
How It Works
- When triggered,
workOnce()sets duration state tostarted. - If the game is currently in a loading state (
core_gamestate.loading()), it callsserver.fadeoutLoadingScreen()and finishes immediately. - Otherwise, calls
ui_fadeScreen.fadeFromBlack(duration). - When the fade completes,
onScreenFadeState(3)fires and sets the duration tofinished, activating thecompleteoutput.
Usage Example
-- Typical flowgraph pattern:
-- [Some Action] → [Fade From Black (duration=0.75)] → [Next Action]
--
-- The node calls:
ui_fadeScreen.fadeFromBlack(0.75)
-- and waits for onScreenFadeState(3) before passing flow.Key Dependencies
ui_fadeScreen.fadeFromBlack()- performs the actual screen fadecore_gamestate.loading()- checks if game is in loading stateserver.fadeoutLoadingScreen()- fades out loading screen if active
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide