Skip to content

Commit d2e7e74

Browse files
committed
visual script nodes
1 parent 147d83a commit d2e7e74

24 files changed

Lines changed: 613 additions & 162 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Visual Script Node Reference
2+
3+
This section documents all the node types available in visual scripts.
4+
5+
## Node Categories
6+
7+
- [Event Handler Nodes](vscript-nodes-events.md) - React to messages and events
8+
- [Blackboard Nodes](vscript-nodes-blackboard.md) - Work with blackboards
9+
- [Time and Clock Nodes](vscript-nodes-time.md) - Access global and world clocks
10+
- [Component Nodes](vscript-nodes-component.md) - Component operations
11+
- [Property Nodes](vscript-nodes-property.md) - Read and write component properties
12+
- [Coroutine Nodes](vscript-nodes-coroutine.md) - Manage coroutines
13+
- [CVar Nodes](vscript-nodes-cvar.md) - Read and write CVars
14+
- [Debug Nodes](vscript-nodes-debug.md) - Debug rendering
15+
- [Enum Nodes](vscript-nodes-enum.md) - Work with enum values
16+
- [Game Object Nodes](vscript-nodes-game-object.md) - Game object operations
17+
- [World Nodes](vscript-nodes-world.md) - Access the world
18+
- [Logic Nodes](vscript-nodes-logic.md) - Conditionals and loops
19+
- [Math Nodes](vscript-nodes-math.md) - Mathematical operations
20+
- [Message Nodes](vscript-nodes-messages.md) - Send messages
21+
- [Physics Nodes](vscript-nodes-physics.md) - Physics engine functions
22+
- [Prefab Nodes](vscript-nodes-prefabs.md) - Spawn prefabs
23+
- [Spatial Nodes](vscript-nodes-spatial.md) - Spatial queries and transforms
24+
- [Sound Nodes](vscript-nodes-sound.md) - Play sounds
25+
- [State Machine Nodes](vscript-nodes-statemachine.md) - Interact with state machines
26+
- [String Nodes](vscript-nodes-string.md) - String operations
27+
- [Logging Nodes](vscript-nodes-log.md) - Log messages
28+
- [Variable and Type Conversion Nodes](vscript-nodes-variables.md) - Variables and type conversion
29+
30+
## See Also
31+
32+
- [Visual Script Class Asset](../visual-script-class-asset.md)
33+
- [Visual Script Overview](../visual-script-overview.md)
34+
- [Script Component](../script-component.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Visual Script: Blackboard Nodes
2+
3+
## Blackboards
4+
5+
[Blackboards](../../misc/blackboards.md) are shared data storage systems that allow different game objects and components to communicate by reading and writing named values. The blackboard nodes in visual scripts provide access to blackboard entries for reading and modifying shared state.
6+
7+
## See Also
8+
9+
* [Visual Script Class Asset](../visual-script-class-asset.md)
10+
* [Visual Script Overview](../visual-script-overview.md)
11+
* [Script Component](../script-component.md)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Visual Script: Component and Property Nodes
2+
3+
## Component
4+
5+
Component nodes provide access to functionality shared by all [components](../../runtime/world/components.md). These are essential nodes for interacting with the component system and navigating the object hierarchy.
6+
7+
Common component operations:
8+
9+
* `GetOwner`: Returns the component's owner [game object](../../runtime/world/game-objects.md)
10+
* `GetWorld`: Returns the [world](../../runtime/world/worlds.md) that the component belongs to
11+
12+
Additionally, each component type has its own specialized nodes available in the sub-menus, providing access to component-specific functionality. Use these together with [property nodes](vscript-nodes-property.md) to read and modify component state.
13+
14+
## See Also
15+
16+
* [Visual Script Class Asset](../visual-script-class-asset.md)
17+
* [Visual Script Overview](../visual-script-overview.md)
18+
* [Script Component](../script-component.md)
19+
* [Components](../../runtime/world/components.md)
20+
* [Game Object Nodes](vscript-nodes-game-object.md)
21+
* [World Nodes](vscript-nodes-world.md)
22+
* [Property Nodes](vscript-nodes-property.md)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Visual Script: Coroutine Nodes
2+
3+
## Coroutine
4+
5+
[Coroutines](../visual-script-class-asset.md#coroutines) allow you to pause script execution at any point and resume it later, enabling complex temporal behaviors without blocking the entire script. This is particularly useful for sequencing AI tasks, quest objectives, or any operations that need to wait for conditions or time to pass.
6+
7+
Common coroutine operations include:
8+
9+
* **Starting and stopping coroutines** - Launch new execution threads or cancel existing ones
10+
* **Waiting** - Pause execution for a specified duration
11+
* **Yielding** - Pause until the next frame
12+
* **Coroutine management** - Track and control multiple concurrent execution paths
13+
14+
Each [entry point node](vscript-nodes-events.md) can be configured with a coroutine mode (Stop Other, Don't Create New, or Allow Overlap) to control how multiple coroutines interact. See the [coroutines documentation](../visual-script-class-asset.md#coroutines) for detailed information on coroutine modes and advanced features.
15+
16+
## See Also
17+
18+
* [Visual Script Class Asset](../visual-script-class-asset.md)
19+
* [Visual Script Overview](../visual-script-overview.md)
20+
* [Script Component](../script-component.md)
21+
* [Event Handler Nodes](vscript-nodes-events.md)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Visual Script: CVar Nodes
2+
3+
## CVar
4+
5+
CVar nodes allow you to read and write [console variables (CVars)](../../debugging/cvars.md) from within visual scripts. CVars are configuration values that can be modified at runtime through the console, making them useful for debugging, testing, and exposing tunable parameters.
6+
7+
Use CVar nodes to:
8+
9+
* **Read CVar values** - Access configuration settings and debug flags
10+
* **Write CVar values** - Modify settings programmatically based on game state
11+
* **Dynamic configuration** - Change behavior without recompiling
12+
* **Debug controls** - Toggle features or adjust parameters during development
13+
14+
CVars are particularly useful during development for tweaking gameplay values, enabling debug features, or testing different configurations. They can also be used to expose user settings that players can modify through the console.
15+
16+
## See Also
17+
18+
* [Visual Script Class Asset](../visual-script-class-asset.md)
19+
* [Visual Script Overview](../visual-script-overview.md)
20+
* [Script Component](../script-component.md)
21+
* [Console Variables](../../debugging/cvars.md)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Visual Script: Debug Nodes
2+
3+
## Debug
4+
5+
Debug nodes provide functionality for [debug rendering](../../debugging/debug-rendering.md), allowing you to visualize information directly in the game viewport. These nodes are invaluable for understanding game logic, troubleshooting issues, and verifying that scripts are working as expected.
6+
7+
Common debug rendering operations:
8+
9+
* **Draw shapes** - Render lines, boxes, spheres, and other geometric primitives
10+
* **Draw text** - Display debug information in 3D space or on screen
11+
* **Visualize vectors** - Show directions, normals, and rays
12+
* **Temporary visuals** - Create visual aids that only appear during development
13+
14+
Debug rendering is visible in both the editor and game viewports and can be toggled on/off through the [debug rendering system](../../debugging/debug-rendering.md). Use debug nodes liberally during development to visualize raycasts, AI decisions, trigger volumes, or any other abstract concepts that are hard to understand without visual feedback.
15+
16+
Combine debug nodes with [logging nodes](vscript-nodes-log.md) for comprehensive debugging capabilities.
17+
18+
## See Also
19+
20+
* [Visual Script Class Asset](../visual-script-class-asset.md)
21+
* [Visual Script Overview](../visual-script-overview.md)
22+
* [Script Component](../script-component.md)
23+
* [Debug Rendering](../../debugging/debug-rendering.md)
24+
* [Logging Nodes](vscript-nodes-log.md)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Visual Script: Enum Nodes
2+
3+
## Enums
4+
5+
Enum nodes allow you to work with enumeration values in visual scripts. Enumerations are predefined sets of named constants that make scripts more readable and less error-prone than using magic numbers.
6+
7+
For each enum type, visual scripts provide two categories of nodes:
8+
9+
* **Value nodes** - Return a specific enum constant. Use these to pass enum values to other nodes or compare against enum properties.
10+
* **Switch nodes** - Branching nodes that execute different code paths based on an enum value. Similar to a switch statement in programming, these nodes have one execution pin for each possible enum value.
11+
12+
13+
## See Also
14+
15+
* [Visual Script Class Asset](../visual-script-class-asset.md)
16+
* [Visual Script Overview](../visual-script-overview.md)
17+
* [Script Component](../script-component.md)
18+
* [Logic Nodes](vscript-nodes-logic.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Visual Script: Event Handler Nodes
2+
3+
## Event Handlers
4+
5+
Event handlers are nodes that get executed when a certain [message](../../runtime/world/world-messaging.md) is sent to any of the objects that this script is responsible for. All event handlers are *entry points* into the script and most scripts will only execute as a reaction to an event.
6+
7+
## See Also
8+
9+
- [Visual Script Class Asset](../visual-script-class-asset.md)
10+
- [Visual Script Overview](../visual-script-overview.md)
11+
- [Script Component](../script-component.md)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Visual Script: Game Object Nodes
2+
3+
## Game Object
4+
5+
[Game object](../../runtime/world/game-objects.md) nodes provide functionality for working with game objects in the scene hierarchy. These nodes allow you to navigate the object tree, manipulate transforms, and access components.
6+
7+
Common game object operations:
8+
9+
* **Transform access** - Read and write position, rotation, and scale
10+
* **Hierarchy navigation** - Find parent and child objects, search by name
11+
* **Component access** - Get components attached to game objects
12+
* **Object state** - Check if objects are active, valid, or tagged
13+
* **Object creation** - Spawn and destroy game objects dynamically
14+
15+
Game object nodes are fundamental to most visual scripts, as they allow you to locate and manipulate objects in the scene. Use them together with [component nodes](vscript-nodes-component.md) to access specific functionality, and [prefab nodes](vscript-nodes-prefabs.md) to instantiate new objects.
16+
17+
## See Also
18+
19+
* [Visual Script Class Asset](../visual-script-class-asset.md)
20+
* [Visual Script Overview](../visual-script-overview.md)
21+
* [Script Component](../script-component.md)
22+
* [Game Objects](../../runtime/world/game-objects.md)
23+
* [Component Nodes](vscript-nodes-component.md)
24+
* [Prefab Nodes](vscript-nodes-prefabs.md)
25+
* [Spatial Nodes](vscript-nodes-spatial.md)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Visual Script: Logging Nodes
2+
3+
## Log
4+
5+
Logging nodes output messages to the [engine's log system](../../debugging/logging.md), allowing you to track script execution, debug issues, and monitor runtime behavior. These nodes are essential for understanding what your scripts are doing and troubleshooting problems.
6+
7+
Logging features:
8+
9+
* **Formatted messages** - Create log messages with variable substitution using format strings
10+
* **Multiple inputs** - Add any number of input values to include in the log message
11+
* **Format syntax** - Reference input values using `{0}`, `{1}`, `{2}` and so on in your format string
12+
* **Log levels** - Output at different severity levels (info, warning, error)
13+
14+
Example: A log message with format string `"Player health: {0}, position: {1}"` with two inputs will substitute the values into the message.
15+
16+
## See Also
17+
18+
* [Visual Script Class Asset](../visual-script-class-asset.md)
19+
* [Visual Script Overview](../visual-script-overview.md)
20+
* [Script Component](../script-component.md)
21+
* [Logging](../../debugging/logging.md)
22+
* [Debug Nodes](vscript-nodes-debug.md)
23+
* [String Nodes](vscript-nodes-string.md)

0 commit comments

Comments
 (0)