API ReferenceGE Extensionsflowgraphnodesutil
World Editor Open
- **Node Name:** `World Editor Open`
Overview
- Node Name:
World Editor Open - Category:
repeat_instant - File:
extensions/flowgraph/nodes/util/worldEditorOpen.lua
Checks whether the World Editor is currently open and provides flow outputs for open/closed states, plus impulse signals when the state transitions.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
reset | flow (impulse) | Resets the impulse output pins |
Output Pins
| Pin | Type | Description |
|---|---|---|
open | flow | Active flow when the world editor is open |
close | flow | Active flow when the world editor is closed |
onOpened | flow (impulse, hidden) | Fires once when the editor transitions to open |
onClosed | flow (impulse, hidden) | Fires once when the editor transitions to closed |
openOrClosed | bool (hidden) | Boolean reflecting the open state |
Internals
Key Methods
| Method | Description |
|---|---|
reset() | Sets lastState to "none" to re-enable transition detection |
_executionStarted() | Calls reset() |
work() | Checks editor.active, sets flow outputs, detects transitions |
State Tracking
The node tracks self.lastState as "opened", "closed", or "none". Transition impulses (onOpened, onClosed) fire when the state changes from one to another. The reset input clears the last state to allow re-detection.
How It Works
- Each frame, resets
onOpenedandonClosedto false. - Checks
editor and editor.activefor current editor state. - Sets
open/closeflow pins andopenOrClosedboolean accordingly. - Compares current state against
lastStateto detect transitions. - Fires
onOpenedoronClosedimpulse on state change. - Updates
lastStatefor next frame's comparison.
Usage Example
-- Pause gameplay when editor opens:
-- Connect 'onOpened' → pause logic
-- Connect 'onClosed' → resume logic
-- Conditional flow based on editor state:
-- Connect 'open' → editor-specific UI
-- Connect 'close' → gameplay UI
-- Reset transition detection:
-- Send impulse to 'reset' input to re-fire onOpened/onClosedKey Dependencies
editor.active- global editor state flag
See Also
- Route Distance (Flowgraph Node) - Related reference
- Closest Road (Flowgraph Node) - Related reference
- Custom Lua (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide