API ReferenceGE Extensionsflowgraphnodesthread
Send Message (Flowgraph Node)
- **Node Name:** `Send Message`
Overview
- Node Name:
Send Message - Category: (default)
- File:
extensions/flowgraph/nodes/thread/sendMessage.lua
Sends a message to another running flowgraph project. Used for inter-project communication.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | In flow (fixed) |
reset | flow | Impulse to allow re-sending (fixed) |
networked | bool | If networked message (hidden, fixed) |
id | number | ID of the receiver project (-1 for parent) (fixed) |
name | string | Name of the message (fixed) |
Custom input pins can be added for message data (supports string, number, bool, any, table, vec3, quat, color).
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Passes through input flow |
Behavior
init()- Enables pin saving and custom input pins.work()- When flow is active,idis set, and not already done:- Collects all non-fixed pin values into a data table
- Sends via
thread:sendMessage()orthread:sendNetworkedMessage()depending onnetworkedflag - Marks as
done(won't send again until reset)
- Reset - The
resetimpulse clears thedoneflag.
How It Works
- Get the target project ID from a
loadProjectnode (or use-1for the parent project). - Set the message
name. - Add custom input pins for any data to include.
- On execution, the message is sent once. Use
resetto send again.
-- Send a score update to project ID 2:
-- id = 2, name = "score_update", custom pin "score" = 100
-- Calls: self.mgr.modules.thread:sendMessage(2, {score = 100}, self)
-- Send to parent project:
-- id = -1Key Dependencies
self.mgr.modules.thread:sendMessage()- Local message deliveryself.mgr.modules.thread:sendNetworkedMessage()- Networked message delivery
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:drawMiddle(builder, style)
Custom ImGui drawing in the middle section of the node in the editor.
Parameters:
builderstyle
See Also
- Load Project (Flowgraph Node) - Related reference
- Receive Message (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide