API ReferenceGE Extensionsflowgraphnodestypes
String (Flowgraph Node)
- **Node Name:** `String`
Overview
- Node Name:
String - Category:
provider - File:
extensions/flowgraph/nodes/types/string.lua
Provides a constant string value. Supports single-line and multi-line text input in the editor.
Pin Schema
Output Pins
| Pin | Type | Description |
|---|---|---|
value | string | The string value |
Internals
| Field | Purpose |
|---|---|
self.string | The stored string (default: "Hello World") |
self.multiLine | Whether the editor shows a multi-line text input |
How It Works
init()- Setsself.string = "Hello World"andmultiLine = false.work()- Outputsself.stringto the output pin.drawCustomProperties()- Renders a checkbox to toggle multi-line mode. Shows eitherInputTextorInputTextMultilinefor editing.drawMiddle()- Shows up to 10 characters of the string inline, with...for longer strings.
Serialization
- Serializes newlines as
\\nescape sequences. - On deserialization, restores newlines and reads from either
nodeData.data.value(legacy) ornodeData.string.
Example Usage
-- This node outputs a constant string every frame.
-- Set in the node properties panel.
-- Equivalent to:
self.pinOut.value.value = "Hello World"Additional Methods
C:_onDeserialized(nodeData)
Called after the node is deserialized (loaded from file). Restores runtime state from saved data.
Parameters:
nodeData
C:_onSerialize(res)
Called when the node is serialized (saved to file). Returns data to persist.
Parameters:
res
C:drawProperties()
Custom ImGui drawing function for the node editor.
See Also
- Bool (Flowgraph Node) - Related reference
- Color (Flowgraph Node) - Related reference
- Generic Set/Get Variable (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide