Nodes
All the node types available in State Machine 2
State Machine 2 provides a variety of node types to build any game logic you can imagine.
Node Types Overview
๐ข Start
Entry point
Begins state machine execution
โก Actions
Execute tasks
Runs Game Creator 2 actions
๐ Branch
Decision
Multiple conditional paths
โ Conditions
Evaluate
Check conditions before proceeding
๐ฏ Trigger
Events
React to game events
๐ฆ Sub-State Machine
Modular
Embed another state machine
๐ช Exit
Terminate
End execution with callbacks
โก๏ธ Relay
Organization
Visual routing (no logic)
๐ข Start Node
The Start Node is the entry point of your state machine. Execution begins here when the runner starts.

Features
Automatically created when you create a new state machine
Cannot be manually created or deleted
Can include initial actions
Only has output ports (no inputs)
Connections
Output
โ
Actions, Branch, Conditions, Sub-State Machine, Exit
โก Actions Node
The Actions Node executes one or more Game Creator 2 actions in sequence.

Features
Add unlimited actions
Actions execute in order (top to bottom)
Supports async actions (waits for completion)
Can be triggered by any node type
Connections
Input
โ
Start, Actions, Branch, Conditions, Trigger, Sub-State Machine
Output
โ
Any node
Use Cases
Play animations or sounds
Modify variables
Control characters
Spawn objects
Any Game Creator 2 action
๐ Branch Node
The Branch Node creates multiple conditional paths, similar to a switch statement.

Features
Add multiple branches with conditions
Each branch has its own conditions and actions
First matching branch executes
Default output if no conditions match
Connections
Input
โ
Any node
True Outputs
โ
Per-branch outputs
Default Output
โ
Fallback when no conditions match
Example
โ Conditions Node
The Conditions Node evaluates conditions and routes execution based on the result.

Features
Add multiple conditions (AND logic)
Two outputs: True and False
Can be triggered by other nodes or triggers
Connections
Input
โ
Any node
Trigger Input
โ
Trigger nodes only
True Output
โ
When all conditions pass
False Output
โ
When any condition fails
Use Cases
Check player state before actions
Validate game conditions
Gate progression
๐ฏ Trigger Node
The Trigger Node reacts to Game Creator 2 events and triggers, providing event-driven execution.

Features
Use any GC2 trigger type
Event-driven (waits for trigger)
Self-contained entry point
Works with collision, input, timers, and more
Connections
Output
โ
Actions, Branch, Conditions, Sub-State Machine
Condition Output
โ
Directly to Conditions nodes
Common Triggers
On Start
When runner begins
On Update
Every frame
On Trigger Enter
Collision detection
On Input
Player input
On Timer
Timed events
On Variable Change
React to data changes
Trigger nodes can act as alternative entry points, running in parallel with the Start node.
๐ฆ Sub-State Machine Node
The Sub-State Machine Node embeds another state machine, enabling modular and reusable design.
Features
Reference any State Machine asset
Nested execution
Exit nodes in the sub-machine connect to this node's outputs
Perfect for reusable behavior modules
Connections
Input
โ
Any node
Output
โ
Triggered by Exit nodes in the sub-machine
Use Cases
Reusable AI behaviors (Patrol, Combat, Flee)
Game mode management (Menu, Playing, Paused)
Complex sequences (Cutscenes, Tutorials)
Creating Sub-State Machines
Drag a State Machine asset into the graph
Or right-click โ Create Node โ Sub-State Machine
Assign the state machine asset in the Inspector
๐ช Exit Node
The Exit Node terminates state machine execution and can trigger callbacks.
Features
Automatically created when you create a new state machine
Cannot be manually created or deleted
Clean termination point
Triggers parent Sub-State Machine outputs
Useful for signaling completion
Connections
Input
โ
Any node
(No outputs)
โ
Terminates execution
Use Cases
End a sub-state machine and continue parent flow
Signal completion of a behavior
Clean shutdown with callbacks
โก๏ธ Relay Node
The Relay Node is for visual organization only โ it doesn't execute any logic.
Features
Route connections for cleaner graphs
No execution overhead
Purely visual organization
Connections
Input
โ
Any node
Output
โ
Any node
Use Cases
Organize complex connection paths
Improve graph readability
Route around node clusters
See Also
Node Features โ Common features like rename, lock, disable
Graph Editor โ Creating and connecting nodes
Getting Started โ Build your first state machine
Last updated
Was this helpful?