Skip to main content

Visual Scripting API Reference

This page contains a reference of the entire visual scripting API available to you in The Mirror.

Entry Signals

These signals can be used as entry points for your script (the first run blocks that are executed). Some come from SpaceObject, some come from subnodes, and some are global signals. Global scripts may only use global signals. Object scripts may use all signals.

SpaceObject

Signals emitted when a player interacts with a SpaceObject.

On Player Interact

Emitted when a player interacts with a SpaceObject.

Output NameData Type
PlayerObject

Trigger

Signals emitted when physics trigger events happen, like bodies entering triggers.

On Player Interact

Emitted when a player interacts with a trigger.

Output NameData Type
PlayerObject

On Body Entered Trigger

Emitted when a physics body is of type Trigger and another body enters it.

Output NameData Type
BodyObject

On Body Exited Trigger

Emitted when a physics body is of type Trigger and another body exits it.

Output NameData Type
BodyObject

Animation

Signals emitted when an AnimationPlayer node finishes playing an animation.

On Animation Animation Finished

Emitted when an AnimationPlayer node finishes playing an animation. This signal requires an AnimationPlayer subnode.

Output NameData Type
Animation NameString

Audio

Signals emitted when an audio player node finishes playing its audio.

On Audio Finished

Emitted when an audio player node finishes playing an audio file. This signal requires an AudioStreamPlayer(3D) subnode.

Timer

Signals emitted when a Timer node finishes counting down.

On Timer Timeout

Emitted when a Timer node finishes counting down. This signal requires a Timer subnode. Note: The duration is an input that you can adjust in the inspector, it is not supplied by the signal.

Output NameData Type
Durationfloat

Player

Global signals emitted when events happen to players.

On Player Connected

Emitted when a player connects to the server. This is a global signal, it can be used from any script.

Output NameData Type
PlayerObject

On Player Disconnected

Emitted when a player disconnects from the server. This is a global signal, it can be used from any script.

Output NameData Type
PlayerObject

On Player Killed By Player

Emitted when a player is killed by another player. This is a global signal, it can be used from any script.

Output NameData Type
Victim PlayerObject
Killer PlayerObject
Victim TeamString
Killer TeamString
Friendly Firebool

On Player Spawned

Emitted when a player spawns. This is a global signal, it can be used from any script.

Output NameData Type
PlayerObject

Variables

Global signals emitted when variables are changed.

On Global Variable Changed

Emitted when any global variable is changed. To avoid infinite loops, this is deferred until the end of the frame. This is a global signal, it can be used from any script.

Output NameData Type
Variable NameString
Variable ValueVariant

On Global Variable Tweened

Emitted when any global variable is tweened. To avoid infinite loops, this is deferred until the end of the frame. This is a global signal, it can be used from any script.

Output NameData Type
Variable NameString
From ValueVariant
To ValueVariant
Durationfloat

On Object Variable Changed

Emitted when any object variable is changed. To avoid infinite loops, this is deferred until the end of the frame. This is a global signal, it can be used from any script.

Output NameData Type
ObjectObject
Variable NameString
Variable ValueVariant

On Object Variable Tweened

Emitted when any object variable is tweened. To avoid infinite loops, this is deferred until the end of the frame. This is a global signal, it can be used from any script.

Output NameData Type
ObjectObject
Variable NameString
From ValueVariant
To ValueVariant
Durationfloat

Match

Global signals emitted when a match or round starts or ends.

On Match Start

Emitted when a match starts. This is a global signal, it can be used from any script.

Output NameData Type
Freeze Timefloat

On Match End

Emitted when a match ends (but not when it's terminated). This is a global signal, it can be used from any script.

Output NameData Type
Winning Team NameString

On Round Start

Emitted when a round starts. This is a global signal, it can be used from any script.

Output NameData Type
Freeze Timefloat

On Round End

Emitted when a round ends (but not when it's terminated). This is a global signal, it can be used from any script.

Output NameData Type
Winning Team NameString

On Team Score Changed

Emitted when a team's score changes. This signal will only emit for valid teams. This is a global signal, it can be used from any script.

Output NameData Type
Team NameString
Team Scoreint

Global

Misc global signals not covered by other categories.

On Game Start

Emitted when the game starts after all SpaceObjects have loaded. This is a global signal, it can be used from any script.

On Process Every Frame

Emitted every frame. Please avoid using this signal if possible, as it can be very expensive. This is a global signal, it can be used from any script.

Output NameData Type
Delta Timefloat

On Death

Emitted when a player dies. This is a global signal, it can be used from any script.

Output NameData Type
Target ObjectObject
Event OriginString

On Server Revive

Emitted when a player is revived by the server. This is a global signal, it can be used from any script.

Output NameData Type
Target ObjectObject
Event OriginString

On Health Changed

Emitted when a player's health changes. This is a global signal, it can be used from any script.

Output NameData Type
Target ObjectObject
New Healthfloat
Old Healthfloat
Event OriginString

OMI_seat

Signals emitted from a seat as defined by OMI_seat.

On OMI_seat Player Sit Here

Emitted when a player sits on a seat as defined by OMI_seat. This signal requires an OMI_seat subnode.

Output NameData Type
PlayerObject

On OMI_seat Player Unsit Here

Emitted when a player stops sitting on a seat as defined by OMI_seat. This signal requires an OMI_seat subnode.

Output NameData Type
PlayerObject

OMI_spawn_point

Signals emitted from a spawn point as defined by OMI_spawn_point.

On OMI_spawn_point Player Spawned Here

Emitted when a player spawns at a spawn point as defined by OMI_spawn_point. This signal requires an OMI_spawn_point subnode.

Output NameData Type
PlayerObject

Script Blocks

Regular script blocks. These allow you to perform actions (run blocks) or gather information (data blocks).

Misc

These blocks are very important, and so are top-level in the script block creation dialog, not tucked away in a category.

Prints a Message to the chat. If ran on a script attached to an object, it will make that object "talk". If the Range is 0 or less, it will be global. If the range is less than 2, it will be a whisper. If the range is less than 40, it will be a say. If the range is 40 or greater, it will be a shout.

Input NameData TypeDefault Value
MessageVariant""
Rangefloat20.0

Prints a Message to the notification area. The Notify Status can be Info, Success, Warning, or Error.

Input NameData TypeDefault Value
TitleString"Script Notification"
MessageVariant""
Notify StatusString"Info"

Emit Signal

Emits a custom user-defined signal on an object. The Signal Name must be a signal with an entry block already defined elsewhere in your Space. If the Object is null, the signal will emit on the object the script is attached to.

Input NameData TypeDefault Value
Signal NameString""
ObjectObjectnull

Flow

Flow blocks control the flow of execution in your script. They are used to run code in a specific order, or to run code when a condition is met.

Branch

Branches the flow of execution based on a Condition. If the Condition is true, it will execute the True flow. If the Condition is false, it will execute the False flow.

Input NameData TypeDefault Value
Conditionboolfalse

If

Executes the True flow if the Condition is true. If the Condition is false, it will execute the False flow. After executing the True or False flow, it will execute the Done flow.

Input NameData TypeDefault Value
Conditionboolfalse

If Equals

Executes the True flow if the Left value equals the Right value. If the values are not equal, it will execute the False flow. This is equivalent to if Left == Right: in GDScript. After executing the True or False flow, it will execute the Done flow.

Input NameData TypeDefault Value
LeftVariant""
RightVariant""

Loop

Loops the given number of Times and executes Action each time. Index starts at 0 and is exclusive at the end (if Times is 3, Index will be 0, 1, then 2). The Action flow may only run at most 1000 times. This is equivalent to for i in range(times) in GDScript. After finishing the loop, it will execute the Done flow.

Input NameData TypeDefault Value
Timesint5
Output NameData Type
Indexint

While

Loops while the Condition is true. This is equivalent to while Condition: in GDScript. The True flow may only run at most 1000 times. After finishing the loop, it will execute the Done flow.

Input NameData TypeDefault Value
Conditionboolfalse

Match Flow

If the Input matches a Case, the Flow with the same number will be executed. If no flow matches, it will execute the Default flow. After executing the matched or Default flow, it will execute the Done flow.

Input NameData TypeDefault Value
InputVariant""
Case 1Variant""

Wait (Async)

Pauses the script execution for the given number of seconds.

Input NameData TypeDefault Value
Secondsfloat1.0

Logic

Logic blocks are used to perform logic operations on data, like comparing numbers, matching values, or combining boolean values.

If Value

If Condition is true, Output is set to the True value. Otherwise, Output is set to the False value. This is equivalent to Output = True if Condition else False in GDScript.

Input NameData TypeDefault Value
Conditionboolfalse
TrueVariant""
FalseVariant""
Output NameData Type
OutputVariant

Match Value

If Input matches a Case, the Value with the same number will be set as the Output. Otherwise, the Output will be set to Default.

Input NameData TypeDefault Value
InputVariant""
DefaultVariant""
Case 1Variant""
Value 1Variant""
Output NameData Type
OutputVariant

And

If both Left and Right are true, Result will be true. Otherwise, Result will be false. This is equivalent to Left and Right in GDScript.

Input NameData TypeDefault Value
Leftboolfalse
Rightboolfalse
Output NameData Type
Resultbool

Equals

If Left equals Right, Result will be true. Otherwise, Result will be false. This is equivalent to Left == Right in GDScript.

Input NameData TypeDefault Value
LeftVariant""
RightVariant""
Output NameData Type
Resultbool

Greater Than

If Left is greater than Right, Result will be true. Otherwise, Result will be false. This is equivalent to Left > Right in GDScript.

Input NameData TypeDefault Value
Leftfloat0.0
Rightfloat0.0
Output NameData Type
Resultbool

Less Than

If Left is less than Right, Result will be true. Otherwise, Result will be false. This is equivalent to Left < Right in GDScript.

Input NameData TypeDefault Value
Leftfloat0.0
Rightfloat0.0
Output NameData Type
Resultbool

Not

If Input is true, Result will be false. If Input is false, Result will be true. This is equivalent to not Input in GDScript.

Input NameData TypeDefault Value
Inputboolfalse
Output NameData Type
Resultbool

Or

If either Left or Right is true, Result will be true. Otherwise, Result will be false. This is equivalent to Left or Right in GDScript.

Input NameData TypeDefault Value
Leftboolfalse
Rightboolfalse
Output NameData Type
Resultbool

Math

Math blocks are used to perform math operations on numbers, like adding, subtracting, multiplying, or dividing.

Add

Adds Left and Right together. This is equivalent to Left + Right in GDScript.

Input NameData TypeDefault Value
Value 1Math0.0
Value 2Math0.0
Output NameData Type
ResultMath

Clamp

Clamps Value between Minimum and Maximum. This is equivalent to clamp(Value, Minimum, Maximum) in GDScript.

Input NameData TypeDefault Value
ValueMath0.0
MinimumMath0.0
MaximumMath1.0
Output NameData Type
ResultMath

Divide

Divides Left by Right. This is equivalent to Left / Right in GDScript.

Input NameData TypeDefault Value
LeftMath0.0
RightMath0.0
Output NameData Type
ResultMath

Modulus

Returns the modulus of Left and Right. For integers, this is equivalent to posmod(Left, Right) in GDScript.

Input NameData TypeDefault Value
LeftMath0.0
RightMath0.0
Output NameData Type
ResultMath

Multiply

Multiplies Left and Right together. This is equivalent to Left * Right in GDScript.

Input NameData TypeDefault Value
LeftMath0.0
RightMath0.0
Output NameData Type
ResultMath

Subtract

Returns Left minus Right. This is equivalent to Left - Right in GDScript.

Input NameData TypeDefault Value
LeftMath0.0
RightMath0.0
Output NameData Type
ResultMath

Constant Math Expression

Evaluates the given math expression at compile time, using the Expression class provided by Godot.

Input NameData TypeDefault Value
ExpressionString"TAU / 4"
Output NameData Type
Resultfloat

Random Number

Returns a random number between Minimum and Maximum, with a multiple of Step. This is inclusive on both sides, so it may return Minimum or Maximum.

Input NameData TypeDefault Value
Minimumfloat0.0
Maximumfloat1.0
Stepfloat0.0
Output NameData Type
Numberfloat

Rotation Looking At

Returns a rotation such that the +Z axis points towards Positive and the -Z axis points towards Negative. Positive and Negative may not be equal or vertically on top of each other.

Input NameData TypeDefault Value
PositiveObjectnull
NegativeObjectnull
Up DirectionVector3(0, 1, 0)
Output NameData Type
Euler Angles DegreesVector3

Time

Time blocks are used to get the current time, convert between time formats, and format time values.

Get Current Unix Time In UTC

Returns the current Unix timestamp in seconds based on the system time in UTC. This method always returns the time in UTC.

Output NameData Type
Unix Timestampfloat

Date/Time String To Unix Timestamp

Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.

Input NameData TypeDefault Value
ISO 8601 Date/TimeString""
Output NameData Type
Unix Timestampint

Date/Time Values To Unix Timestamp

Converts the given date/time values to a Unix timestamp.

Input NameData TypeDefault Value
Yearint1970
Monthint1
Dayint1
Hourint0
Minuteint0
Secondint0
Output NameData Type
Unix Timestampint

Unix Timestamp To Date/Time String

Converts the given Unix timestamp to an ISO 8601 date/time string.

Input NameData TypeDefault Value
Unix Timestampint0
Output NameData Type
ISO 8601 Date/TimeString

Unix Timestamp To Date/Time Values

Converts the given Unix timestamp to date/time values.

Input NameData TypeDefault Value
Unix Timestampint0
Output NameData Type
Yearint
Monthint
Dayint
Hourint
Minuteint
Secondint

String

String blocks are used to perform string operations, like concatenating strings and formatting strings.

String Case Insensitive Equals

Performs a case-insensitive equality check on the given Strings. For example, "RED", "red", and "Red" would all be considered equal to each other.

Input NameData TypeDefault Value
LeftString""
RightString""
Output NameData Type
Resultbool

Concatenate Strings

Concatenates the given strings together (also known as adding or appending the strings).

Input NameData TypeDefault Value
Value 1String""
Value 2String""
Output NameData Type
ResultString

Join Strings

Joins the given strings together with the given Joiner in between each string. This is equivalent to Joiner.join(PackedStringArray([Value1, Value2])) in GDScript.

Input NameData TypeDefault Value
JoinerString", "
Value 1String""
Value 2String""
Output NameData Type
ResultString

Convert To String

Converts the given Input value to a string. This is equivalent to str(Input) in GDScript.

Input NameData TypeDefault Value
InputVariant""
Output NameData Type
StringString

Convert To JSON

Converts the given Key and Value to JSON as {Key: Value}.

Input NameData TypeDefault Value
KeyString"name"
ValueVariant""
Output NameData Type
JSONString

Format String Using Array

Formats the given Template string using the given Values array. This is equivalent to Template % Values in GDScript.

Input NameData TypeDefault Value
TemplateString""
ValuesArray[]
Output NameData Type
StringString

Format String Using JSON

Formats the given Template string using the given JSON. This is equivalent to Template.format(JSON) in GDScript.

Input NameData TypeDefault Value
JSONString""
TemplateString""
Output NameData Type
StringString

Get JSON key Value

Returns the Value for the given Key in the given JSON. If the Key does not exist, it will return null. This is equivalent to JSON.get(Key) in GDScript.

Input NameData TypeDefault Value
JSONString""
KeyString""
Output NameData Type
ValueVariant

Merge JSONs

Merges the given JSONs together. If the same key exists in both, the value from JSON1 will be used. This is equivalent to JSON1.merge(JSON2) in GDScript.

Input NameData TypeDefault Value
JSON1String""
JSON2String""
Output NameData Type
OutputString

String Length

Returns the amount of characters in the given string. The input data is passed through unchanged for convenience.

Input NameData TypeDefault Value
StringString""
Output NameData Type
PassString
Lengthfloat

Color

Color blocks are used to perform color operations, like constructing colors and converting colors to strings.

Color Construct

Constructs a Color from the given Red, Green, Blue, and Opacity values, on a range of 0 to 1.

Input NameData TypeDefault Value
Redfloat0.0
Greenfloat0.0
Bluefloat0.0
Opacityfloat1.0
Output NameData Type
ColorColor

Color From HSV

Constructs a Color from the given Hue, Saturation, Value, and Opacity values, on a range of 0 to 1.

Input NameData TypeDefault Value
Huefloat0.0
Saturationfloat0.0
Valuefloat0.0
Opacityfloat1.0
Output NameData Type
ColorColor

Color From String

Constructs a Color from the given String. The String can be a friendly name (like red) or a hex color code (like #f00 or #ff0000). Returns Default if the String cannot be converted into a color.

Input NameData TypeDefault Value
StringString""
DefaultColor(0, 0, 0, 1)
Output NameData Type
ColorColor

Color Split

Splits the given Color into its Red, Green, Blue, and Opacity values, on a range of 0 to 1.

Input NameData TypeDefault Value
ColorColor(0, 0, 0, 1)
Output NameData Type
Redfloat
Greenfloat
Bluefloat
Opacityfloat

Color Clamp

Clamps the given input between the given minimum and maximum.

Input NameData TypeDefault Value
ColorColor(0, 0, 0, 1)
MinimumColor(0, 0, 0, 1)
MaximumColor(1, 1, 1, 1)
Output NameData Type
ClampedColor

Vector2

Vector2 blocks are used to perform 2D vector math operations.

Vector2 Construct

Constructs a Vector2 from the given X and Y values.

Input NameData TypeDefault Value
Xfloat0.0
Yfloat0.0
Output NameData Type
VectorVector2

Vector2 From Angle (Sin/Cos)

Constructs a Vector2 from the given angle in degrees. The X value will be the cosine of the angle, and the Y value will be the sine of the angle. The X and Y values are also provided separately, so this script block can be used as Sin and Cos as well, or the values can be wired into a Vector3 Construct block.

Input NameData TypeDefault Value
Degreesfloat0.0
Output NameData Type
VectorVector2
X (Cos)float
Y (Sin)float

Vector2 Split

Splits the given Vector2 into its X and Y values.

Input NameData TypeDefault Value
VectorVector2(0, 0)
Output NameData Type
Xfloat
Yfloat

Vector2 Angle To

Returns the angle between two vectors, in degrees.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
ToVector2(0, 0)
Output NameData Type
Degreesfloat

Vector2 Clamp

Clamps the given input between the given minimum and maximum.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
MinimumVector2(0, 0)
MaximumVector2(0, 0)
Output NameData Type
ClampedVector2

Vector2 Distance To

Returns the distance between two vectors.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
ToVector2(0, 0)
Output NameData Type
Distancefloat

Vector2 Length

Returns the magnitude of the given vector. The input data is passed through unchanged for convenience.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
Output NameData Type
PassVector2
Lengthfloat

Vector2 Move Toward

Moves the first vector towards the given To target by the given amount.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
ToVector2(0, 0)
Deltafloat0.0
Output NameData Type
MovedVector2

Vector2 Project

Projects the first vector onto the Onto vector.

Input NameData TypeDefault Value
Vector2Vector2(0, 0)
OntoVector2(0, 0)
Output NameData Type
ProjectedVector2

Vector3

Vector3 blocks are used to perform 3D vector math operations.

Vector3 Construct

Constructs a Vector3 from the given X, Y, and Z values.

Input NameData TypeDefault Value
Xfloat0.0
Yfloat0.0
Zfloat0.0
Output NameData Type
VectorVector3

Vector3 Split

Splits the given Vector3 into its X, Y, and Z values.

Input NameData TypeDefault Value
VectorVector3(0, 0, 0)
Output NameData Type
Xfloat
Yfloat
Zfloat

Vector3 Angle To

Returns the angle between two vectors, in degrees.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
ToVector3(0, 0, 0)
Output NameData Type
Degreesfloat

Vector3 Clamp

Clamps the given input between the given minimum and maximum.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
MinimumVector3(0, 0, 0)
MaximumVector3(0, 0, 0)
Output NameData Type
ClampedVector3

Vector3 Distance To

Returns the distance between two vectors.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
ToVector3(0, 0, 0)
Output NameData Type
Distancefloat

Vector3 Length

Returns the magnitude of the given vector. The input data is passed through unchanged for convenience.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
Output NameData Type
PassVector3
Lengthfloat

Vector3 Move Toward

Moves the first vector towards the given To target by the given amount.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
ToVector3(0, 0, 0)
Deltafloat0.0
Output NameData Type
MovedVector3

Vector3 Project

Projects the first vector onto the Onto vector.

Input NameData TypeDefault Value
Vector3Vector3(0, 0, 0)
OntoVector3(0, 0, 0)
Output NameData Type
ProjectedVector3

Array

Array blocks are used to perform operations on lists of values.

Array Construct

Constructs an Array from the given values.

Input NameData TypeDefault Value
Index 0Variant""
Index 1Variant""
Output NameData Type
ArrayArray

Array Get

Returns the Value at the given Index in the given Array. If the Index is out of bounds, Value will be set to the default for the selected data type. The input array is passed through unchanged for convenience.

Input NameData TypeDefault Value
ArrayArray[]
Indexint0
Output NameData Type
PassArray
ValueVariant

Array Set

Sets the Value at the given Index in the given Array. If the Index is out of bounds, the Array will be extended to fit the Index, up to a maximum size of 1000. The input array is passed through for convenience (this is not a copy).

Input NameData TypeDefault Value
ArrayArray[]
Indexint0
ValueVariant""
Output NameData Type
PassArray

Array Contains / Find

If the given Array contains the given Value, Found will be true, and Index will be set to the index of the first occurrence. If Value is not in the Array, Found will be false and Index will be -1.

Input NameData TypeDefault Value
ArrayArray[]
ValueVariant""
Output NameData Type
PassArray
Foundbool
Indexint

Array For Each

Loops through each value in the given Array. This is equivalent to for value in array: in GDScript. After finishing the loop, it will execute the Done flow.

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
Indexint
ValueVariant

Array Pick Random

Picks a random Value from the given Array and its Index.

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
Indexint
ValueVariant

Array Duplicate

Duplicates the given collection.

Input NameData TypeDefault Value
ArrayArray[]
Deepboolfalse
Output NameData Type
DuplicatedArray

Array Is Empty

Returns true if the given collection is empty. The input data is passed through unchanged for convenience (this is not a copy).

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
PassArray
Is Emptybool

Array Size

Returns the size of the given collection. The input data is passed through unchanged for convenience (this is not a copy).

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
PassArray
Sizeint

Array Sort

Sorts the given collection. This sorts the original data, and passes it through for convenience (this is not a copy).

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
SortedArray

Array Shuffle

Shuffles the array such that the items will be in a random order. This shuffles the original data, and passes it through for convenience (this is not a copy).

Input NameData TypeDefault Value
ArrayArray[]
Output NameData Type
ShuffledArray

Dictionary

Dictionary blocks are used to perform operations on key/value pairs.

Dictionary Construct

Constructs a Dictionary from the given Key and Value pairs.

Input NameData TypeDefault Value
KeyString""
ValueVariant""
Key 2String""
Value 2Variant""
Output NameData Type
DictionaryDictionary

Dictionary Get

Returns the Value at the given Key in the given Dictionary. If the Key does not exist, Value will be set to the default for the selected data type. The input dictionary is passed through unchanged for convenience.

Input NameData TypeDefault Value
DictionaryDictionary
KeyString""
Output NameData Type
PassDictionary
ValueVariant

Dictionary Set

Sets the Value at the given Key in the given Dictionary. The input dictionary is passed through for convenience (this is not a copy).

Input NameData TypeDefault Value
DictionaryDictionary
KeyString""
ValueVariant""
Output NameData Type
PassDictionary

Dictionary For Each

Loops through each key and value in the given Dictionary. This is equivalent to for key in dictionary: var value = dictionary[key] in GDScript. After finishing the loop, it will execute the Done flow.

Input NameData TypeDefault Value
DictionaryDictionary
Output NameData Type
KeyString
ValueVariant

Dictionary Pick Random

Picks a random Key and Value from the given Dictionary.

Input NameData TypeDefault Value
DictionaryDictionary
Output NameData Type
KeyString
ValueVariant

Dictionary Duplicate

Duplicates the given collection.

Input NameData TypeDefault Value
DictionaryDictionary
Deepboolfalse
Output NameData Type
DuplicatedDictionary

Dictionary Is Empty

Returns true if the given collection is empty. The input data is passed through unchanged for convenience (this is not a copy).

Input NameData TypeDefault Value
DictionaryDictionary
Output NameData Type
PassDictionary
Is Emptybool

Dictionary Size

Returns the size of the given collection. The input data is passed through unchanged for convenience (this is not a copy).

Input NameData TypeDefault Value
DictionaryDictionary
Output NameData Type
PassDictionary
Sizeint

Dictionary Sort

Sorts the given collection. This sorts the original data, and passes it through for convenience (this is not a copy).

Input NameData TypeDefault Value
DictionaryDictionary
Output NameData Type
SortedDictionary

SpaceObject

SpaceObject blocks are used to control SpaceObjects. All objects in your Space are SpaceObjects.

Get Self

Returns the SpaceObject that this script is attached to, or the global scripts singleton if a global script. Note that you usually do not need this script block, as you can leave the Object port blank on most script blocks and it will use Self automatically.

Output NameData Type
SelfObject

Create Space Object (Async)

Creates a new SpaceObject with the given parameters. By default, the transform parameters are relative, the new object will spawn near the object the script is on. The new object will appear in the Space after a very short delay (a fraction of a second). This script block is async, it will pause execution until the SpaceObject finishes being created.

Input NameData TypeDefault Value
Asset IDString""
NameString""
PositionVector3(0, 1, 0)
Rotation DegreesVector3(0, 0, 0)
Relativebooltrue
ScaleVector3(1, 1, 1)
OffsetVector3(0, 0, 0)
Collisionbooltrue
Shape TypeString"Auto"
Body TypeString"Static"
Massfloat1.0
Gravity Scalefloat1.0
Damageableboolfalse
Output NameData Type
SpaceObjectObject

Delete Space Object

Deletes the given SpaceObject.

Input NameData TypeDefault Value
SpaceObjectObjectnull

Get Space Object

Gets the SpaceObject with the given Name or ID. If no object is found, it will return null.

Input NameData TypeDefault Value
Name or IDString""
Output NameData Type
SpaceObjectObject

Is Other Space Object

If the given Object is a SpaceObject and is not the current SpaceObject, Is Other will be true and SpaceObject will be set to the object. If the given Object is not a SpaceObject or is the current SpaceObject, Is Other will be false and SpaceObject will be set to null.

Input NameData TypeDefault Value
ObjectObjectnull
Output NameData Type
Is Otherbool
Space ObjectObject

BBCode To SpaceObject Texture (Async)

Takes the given SpaceObject (On Object) and renders a texture with the given BBCode and background color. The texture will be rendered after a very short delay (a few frames).

Input NameData TypeDefault Value
On ObjectObjectnull
BBCodeString""
BG ColorColor(0, 0, 0, 1)

Scroll Texture

Scrolls the texture on the given SpaceObject (On Object) by the given Scroll Offset over the given Duration with the specified Transition and Easing.

Input NameData TypeDefault Value
On ObjectObjectnull
Scroll OffsetVector2(1, 0)
Durationfloat2.0
TransitionString"Linear"
EasingString"In Out"

NPC Move to

Move the NPC toward the specified location. Returns: ON_TARGET, MOVING_TO_TARGET, MOVING_TO_BASE, ON_BASE

Input NameData TypeDefault Value
On ObjectObjectnull
Target LocationVector3(0, 0, 0)
Accelerationfloat40.0
Decelerationfloat25.0
Max Speedfloat9.0
Step Heightfloat0.2
Max Push Forcefloat5000000.0
Supporting Heightfloat0.2
Gravityfloat9.8
Min Distance From Targetfloat2.0
Max Distance From Targetfloat-1.0
Base LocationVector3(0, 0, 0)
Steering Ray OffsetVector3(0, 1, 0)
Steering Ray Lengthfloat10.0
Steering Ray Radiusfloat0.5
Steering IgnoreArray[]
Rotation offsetfloat0.0
Output NameData Type
ResultString

Damage Using Capsule

Cast a capsule and damage anything within that capsule.

Input NameData TypeDefault Value
On ObjectObjectnull
Damagefloat10.0
Impulsefloat0.0
Can Damage TeamsArray[]
Can Damage Selfboolfalse
IgnoreArray[]
Collider OffsetVector3(0, 0, 0)
Heightfloat2.0
Radiusfloat1.0
Output NameData Type
DamagedArray

Is Dead

Returns true when the SpaceObject or Character is dead.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
Is Deadbool

Get Model Node By Name

Gets a model node of the SpaceObject by name. These are nodes imported from the GLTF file. Model nodes are guaranteed to have a unique name.

Input NameData TypeDefault Value
On ObjectObjectnull
Node NameString""
Output NameData Type
PassObject
Node Or NullObject

Get Model Node By Type

Gets a model node of the SpaceObject by type. These are nodes imported from the GLTF file. If multiple nodes of the same type exist, the first one found is returned.

Input NameData TypeDefault Value
On ObjectObjectnull
Node TypeString""
Output NameData Type
PassObject
Node Or NullObject

Center Model Offset

Adjusts the model offset of the SpaceObject so that the model's center is at the origin of the SpaceObject.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject

Get Space Object Asset Id

Gets the asset ID of the SpaceObject. This is the ID of the asset that was used to create the SpaceObject.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject
Asset IDString

Queue Update Network Object

Queues an update to the SpaceObject's network object. Many operations will automatically queue an update, but this can be used to force an update.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject

Player

Player blocks are used to perform operations on Players.

Get All Players

Gets all Players in the Space as an Array. You can loop over this with the Array For Each script block.

Output NameData Type
PlayersArray

Get Players On Team

Gets all Players on the given Team as an Array. You can loop over this with the Array For Each script block.

Input NameData TypeDefault Value
Team NameString""
Output NameData Type
PlayersArray

Get Local Player (Client-Side)

Gets the local Player. This script block may only be run on client-side scripts. If ran on the server, an error will be printed.

Output NameData Type
PlayerObject

Get Player By ID

Gets a player by their User ID. If found, it is set to Player, and Is Valid will be true. If no player is found, Player will be null, and Is Valid will be false.

Input NameData TypeDefault Value
User IDString""
Output NameData Type
PlayerObject
Is Validbool

Get Players In Range

Gets players in a given range. If multiple players are in range, Closest Player will be the nearest one. If no players are in range, Closest Player will be null and the array will be empty.

Input NameData TypeDefault Value
Relative ToObjectnull
Rangefloat5.0
Output NameData Type
Closest PlayerObject
Players In RangeArray

Get Player Role For Space

Gets the role of the given Player. Return values include but are not limited to OWNER, MANAGER, CONTRIBUTOR, and OBSERVER. Role ID is a number from 0 to 1000 that reflects the permissions level, 1000 means all permissions and 0 means no permissions.

Input NameData TypeDefault Value
PlayerObjectnull
Output NameData Type
Role NameString
Role IDint

Get Player Inventory

Gets the inventory of the given Player. This includes the currently held item and all items. The inventory array is a copy, any writes will not affect the player.

Input NameData TypeDefault Value
PlayerObjectnull
Output NameData Type
InventoryArray
Held ItemString

Get Player Head

Gets the head of the given Player. This can be used to get the position or rotation of the player's viewpoint. This node's transform may only be read, any writes will be ignored and overwritten.

Input NameData TypeDefault Value
PlayerObjectnull
Output NameData Type
HeadObject

Get Player Height

Gets the height of the given Player. The height can either be retrieved in Meters or as a Multiplier of the player's model height.

Input NameData TypeDefault Value
PlayerObjectnull
Height TypeString"Meters"
Output NameData Type
Heightfloat

Set Player Height

Sets the height of the given Player. This can be used to make the player tiny or giant. The height can either be set in Meters or as a Multiplier of the player's model height. For competitive games, you would likely want to set all players to the same height in meters.

Input NameData TypeDefault Value
PlayerObjectnull
Heightfloat1.75
Height TypeString"Meters"

Set Player Avatar

Sets the Player's avatar to the specified URL. This can be used to create an avatar world where users interact with objects to switch to avatars, or to enforce a specific appearance in competitive or class-based games. The Avatar input must be a URL to the avatar GLB file, such as an avatar from Ready Player Me.

For competitive or class-based games, set Lock to true to prevent players from switching to another avatar in their menu. If your game is not competitive but you still want to ensure players are a similar size, consider using Set Player Height instead, as custom avatars are a very fun form of self-expression; most users want to play as themselves.

Input NameData TypeDefault Value
PlayerObjectnull
AvatarString""
Lockboolfalse
Heightfloat1.0
Height TypeString"Multiplier"

Tween Player Height

Tweens the height of the given Player. The height can either be tweened in Meters or as a Multiplier of the player's model height.

Input NameData TypeDefault Value
PlayerObjectnull
Heightfloat1.75
Height TypeString"Meters"
Durationfloat1.0
TransitionString"Linear"
EasingString"In Out"

Is Valid Player

If the given Object is a Player, Is Valid will be true and Player will be set to the player. If the given Object is not a Player, Is Valid will be false and Player will be set to null.

Input NameData TypeDefault Value
ObjectObjectnull
Output NameData Type
Is Validbool
PlayerObject

User Profile Request (Async)

Requests the user profile for the given User ID. The profile will be returned after a short delay (a fraction of a second).

Input NameData TypeDefault Value
User IDString""
Output NameData Type
JSONString

Respawn Player

Respawns the player. This will teleport the player to a random spawn point on the player's team. If no spawn point for this team is found, a random spawn point for a different team will be picked. If the Space has no spawn points, the player will be teleported to the global world origin.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject

Get Player Team

Gets the player's team name.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject
TeamString

Set Player Team

Sets the player's team using the team name and team color.

Input NameData TypeDefault Value
On ObjectObjectnull
TeamString""
ColorColor(0, 0, 0, 1)
Output NameData Type
PassObject

Set Player Input Allowed

Sets whether the player is allowed to move and look around. Setting this to false will disallow and disable input. Setting this to true will allow but not necessarily enable input, because the player may have input disabled for other reasons, like being in a menu.

Input NameData TypeDefault Value
On ObjectObjectnull
Is Allowedboolfalse
Output NameData Type
PassObject

Is Player Input Allowed

Gets whether the player is allowed to move and look around.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject
Is Allowedbool

Add Equipable

Adds an equipable to the player's hotbar. Asset ID must point to an asset with MIRROR_equipable metadata defined in the GLTF file.

Input NameData TypeDefault Value
On ObjectObjectnull
Asset IDString""
Output NameData Type
PassObject

Clear Equipables

Clears the player's hotbar of all equipables.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject

Animation

Animation blocks are used to control playing animations imported from GLTF files.

Play Animation

Plays the given animation on the given Node with the given speed. The node can either be an AnimationPlayer or the ancestor of one; this allows you to play an animation on a SpaceObject and it will automatically find the AnimationPlayer for you. The animation name can be one of the animations supplied by the GLTF model file, or it can be special names stop or pause to stop or pause the animation. If the animation does not exist, it will print an error and script execution will be stopped.

Input NameData TypeDefault Value
NodeObjectnull
NameString"stop"
Speedfloat1.0

Is Animation Playing

Returns true if the given animation is playing on the given Node. The animation name can be one of the animations supplied by the GLTF model file, or it can be empty to check for any animation playing. The node can either be an AnimationPlayer or the ancestor of one; this allows you to check if an animation is playing on a SpaceObject and it will automatically find the AnimationPlayer for you.

Input NameData TypeDefault Value
NodeObjectnull
Name Or EmptyString""
Output NameData Type
Is Playingbool

Get Animation Speed

Returns the speed of animation playback on the given Node. The node can either be an AnimationPlayer or the ancestor of one; this allows you to get the speed of an animation playing on a SpaceObject and it will automatically find the AnimationPlayer for you.

Input NameData TypeDefault Value
NodeObjectnull
Output NameData Type
Speedfloat

Audio

Audio blocks are used to control playing audio clips and audio nodes.

Play Audio Clip

Plays the given Asset ID containing audio as a one-shot audio clip with the given settings. Audio clips are not connected to a persistent audio player node, they are for when you 'just want to play audio' without worrying about nodes. Audio clips cannot be tracked or stopped once started, and may have multiple playing at once, they are best used for short sound effects.

Input NameData TypeDefault Value
Asset IDString""
Volumefloat100.0
Speedfloat1.0
Speed Randomnessfloat0.0
Is Spatialbooltrue
Spatial Rangefloat0.0
Spatial Max Volumefloat150.0

Play Audio Node (Same Settings)

Plays the given audio player node with the same settings as it was last played with. Audio player nodes allow you to persistently keep track of audio playback, including stopping it later, or running a signal when it finishes. Audio nodes may only have one audio playback playing at a time, they are best used for music or game-critical audio like performing an action when the final boss's monologue ends. The node can either be an audio player or the ancestor of one; this allows you to play audio on a SpaceObject and it will automatically find the audio player node for you.

Input NameData TypeDefault Value
NodeObjectnull

Play Audio Node (Custom Settings)

Plays the given audio player node with the given settings. Audio player nodes allow you to persistently keep track of audio playback, including stopping it later, or running a signal when it finishes. Audio nodes may only have one audio playback playing at a time, they are best used for music or game-critical audio like performing an action when the final boss's monologue ends. The node can either be an audio player or the ancestor of one; this allows you to play audio on a SpaceObject and it will automatically find the audio player node for you.

Input NameData TypeDefault Value
NodeObjectnull
Loopboolfalse
Volumefloat100.0
Speedfloat1.0
Speed Randomnessfloat0.0
Is Spatialbooltrue
Spatial Rangefloat0.0
Spatial Max Volumefloat150.0

Is Audio Node Playing

Returns true if the given audio player node is currently playing audio. The node can either be an audio player or the ancestor of one; this allows you to check if a SpaceObject is playing audio and it will automatically find the audio player node for you.

Input NameData TypeDefault Value
NodeObjectnull
Output NameData Type
Is Playingbool

Stop Playing Audio Node

Stops the given audio player node from playing audio. The node can either be an audio player or the ancestor of one; this allows you to stop playing audio on a SpaceObject and it will automatically find the audio player node for you.

Input NameData TypeDefault Value
NodeObjectnull

Physics

Physics blocks are used to manipulate physics objects.

Apply Force Impulse

Applies an Impulse force to the given Physics Body. This is a one-time force with a unit of Newton-seconds (kg⋅m/s). The physics body must be set to Dynamic to use this block.

Input NameData TypeDefault Value
Physics BodyObjectnull
ImpulseVector3(0, 0, 0)

Apply Force Over Time

Applies a Force to the given Physics Body over a period of time specified by Duration. This is a continuous force with a unit of Newtons (kg⋅m/s²). The physics body must be set to Dynamic to use this block.

Input NameData TypeDefault Value
Physics BodyObjectnull
ForceVector3(0, 0, 0)
Durationfloat1.0

Move And Collide

Moves the given Physics Body by the given Movement Amount. This is not recommended if other blocks will work in its place, but is useful for moving a SpaceObject in well-defined steps when you want to have fine control over movement. The physics body must not be Static, but may be Kinematic, Dynamic, or Trigger.

Input NameData TypeDefault Value
Physics BodyObjectnull
Movement AmountVector3(0, 0, 0)

Get Physics Material Properties

Gets the Physics Material Properties of the given Physics Body: Friction and Bounciness (also known as restitution).

Input NameData TypeDefault Value
Physics BodyObjectnull
Output NameData Type
Frictionfloat
Bouncinessfloat

Set Physics Material Properties

Sets the Physics Material Properties of the given Physics Body: Friction and Bounciness (also known as restitution).

Input NameData TypeDefault Value
Physics BodyObjectnull
Frictionfloat0.2
Bouncinessfloat0.0

Physics Raycast

Performs a raycast from the From vector in the Direction vector. If Length is negative, the size of Direction is used as the length. If Sphere Radius is 0 then perform a raycast, otherwise this is the radius of the sphere to use as a shape cast. Hit Triggers allows controlling if the raycast hits triggers, if false only solid objects will be hit. The Ignore inputs allow ignoring self or other objects.

The outputs correspond to the closest hit object. Body is the node that was hit. One of Depth or Fraction will be zero. If the cast started inside of the hit shape, Depth will correspond to the amount of penetration depth. If the cast started outside of the hit shape, Fraction is the ratio of the cast distance which the cast travels to hit it. Normal is the direction of contact, and Position is the location of contact, both in global world space.

All Hits is an Array of Dictionaries that contains "body", "depth", "fraction", "normal", and "position" like the other outputs, but for all hits. When Has Hit is false, All Hits is empty. When Has Hit is true, index 0 is the same data as the outputs. All Hits may zero or one result for raycasts. All Hits may have zero, one, or many results for shape casts.

Input NameData TypeDefault Value
FromVector3(0, 0, 0)
DirectionVector3(0, 0, 0)
Lengthfloat-1.0
Sphere Radiusfloat0.0
Hit Triggersboolfalse
Ignore Selfbooltrue
Ignore ObjectsArray[]
Output NameData Type
Has Hitbool
BodyObject
Depthfloat
Fractionfloat
NormalVector3
PositionVector3
All HitsArray

Environment

Environment blocks are used to control the environment, like the sky, fog, and lighting.

Get Environment Sun

Gets the sun with the given index from the environment. You may have between 0 and 4 suns in your game. If the requested index does not exist, the script block will show error.

Input NameData TypeDefault Value
Indexint0
Output NameData Type
SunObject

Set Environment Fog

Sets the environment's fog settings to the given parameters.

Input NameData TypeDefault Value
Enabledboolfalse
Volumetricboolfalse
Densityfloat0.01
ColorColor(0.8, 0.9, 1, 1)

Set Environment Properties

Sets the environment's Sun Count and Global Illumination to the given values. You may have between 0 and 4 suns in your game.

Input NameData TypeDefault Value
Sun Countint1
Global Illuminationboolfalse

Set Environment Sky Color

Sets the environment's sky colors to the given colors.

Input NameData TypeDefault Value
Top ColorColor(0.38, 0.45, 0.55, 1)
Horizon ColorColor(0.65, 0.65, 0.67, 1)
Bottom ColorColor(0.2, 0.17, 0.13, 1)

Variables

Variable blocks are used to store and retrieve values. Variables may be global or per-object. All variables are reset when starting a new match.

Get Global Variable

Gets the value of the global variable with the given name or path. The variable will be of the type specified by the script block. Variables may be accessed by name or by JSON pointer path. For example, a/b and a.b both refer to "a": {"b": "this value"}. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
NameString""
Output NameData Type
ValueVariant

Has Global Variable

Returns true if the global variable with the given name or path exists, false otherwise. Variables may be accessed by name or by JSON pointer path. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
NameString""
Output NameData Type
Has Variablebool

Set Global Variable

Sets the value of the global variable with the given name or path. Variables may be accessed by name or by JSON pointer path. For example, a/b and a.b both refer to "a": {"b": "this value"}. If the path does not exist, it will be created. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
NameString""
ValueVariant""

Tween Global Variable

Tweens the global variable with the given name or path with the given settings. Variables may be accessed by name or by JSON pointer path. For example, a/b and a.b both refer to "a": {"b": "this value"}. If the path does not exist, it will be created. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
NameString""
ValueVariant""
Durationfloat1.0
TransitionString"Linear"
EasingString"In Out"

Get Object Variable

Gets the value of the object variable with the given name or path. Variables may be accessed by name or by JSON pointer path. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
ObjectObjectnull
NameString""
Output NameData Type
ValueVariant

Has Object Variable

Returns true if the object variable with the given name or path exists, false otherwise. Variables may be accessed by name or by JSON pointer path. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
ObjectObjectnull
NameString""
Output NameData Type
Has Variablebool

Set Object Variable

Sets the value of the object variable with the given name or path. Variables may be accessed by name or by JSON pointer path. If the path does not exist, it will be created. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
ObjectObjectnull
NameString""
ValueVariant""

Tween Object Variable

Tweens the object variable with the given name or path with the given settings. Variables may be accessed by name or by JSON pointer path. If the path does not exist, it will be created. Variables are for user-defined data and are automatically synced over the network.

Input NameData TypeDefault Value
ObjectObjectnull
NameString""
ValueVariant""
Durationfloat1.0
TransitionString"Linear"
EasingString"In Out"

Match

Match blocks are used to control the match and rounds, like starting/ending the match, or adding points to a team.

Start Match

Start a new match and freeze players for the given time. If a match is already running, a new match will override the old one.

Input NameData TypeDefault Value
Freeze Timefloat1.0

End Match

Ends the current match, declares the given team as the winner, and force-shows the scoreboard. If no match is running, a warning will be shown and the block will do nothing.

Input NameData TypeDefault Value
Winning Team NameString""

Terminate Match

Terminates the current match and does not declare a winner. This block will work even when no match is running.

Is Match Running

Returns true if a match is currently running.

Output NameData Type
Is Runningbool

Start Round

Start a new round and freeze players for the given time. If a round is already running, a new round will override the old one. If no match is running, a warning will be shown and the block will do nothing.

Input NameData TypeDefault Value
Freeze Timefloat1.0

End Round

Ends the current round and adds 1 point to this round's winning team. If no round is running, a warning will be shown and the block will do nothing.

Input NameData TypeDefault Value
Winning Team NameString""
Auto Start Nextbooltrue
Auto Start Wait Timefloat3.0
Auto Start Freeze Timefloat1.0

Terminate Round

Terminates the current round without declaring a winner. The next round will not automatically start and no On Round End signal will be emitted. For normal gameplay loops, use End Round instead. If no match is running, a warning will be shown and the block will do nothing.

Is Round Running

Returns true if a round is currently running, false otherwise.

Output NameData Type
Is Runningbool

Set Match Settings

Sets the match settings for the current match to the given Freeze Time, Friendly Fire, and Win Score settings. The settings will be saved to Space Variables. Friendly Fire may be set to "Enabled", "Disabled", "No Kills", or "Reflect".

Input NameData TypeDefault Value
Freeze Timefloat1.0
Friendly FireString"Enabled"
Win Scoreint3

Add Score To Team

Adds the given Score to the given team's score. If the Team Name does not correspond to any team, no score will be set on a team, but if the score is high enough a victory will be triggered anyway. If no match is running, a warning will be shown and the block will do nothing.

Input NameData TypeDefault Value
Team NameString""
Scoreint1

Get Score For Team

Gets the score of the given team. If the Team Name does not correspond to any team, -1 will be returned. This block may run even if no match is running.

Input NameData TypeDefault Value
Team NameString""
Output NameData Type
Scoreint

Set Score For Team

Sets the given team's score to the given New Score. If the Team Name does not correspond to any team, no score will be set on a team, but if the score is high enough a victory will be triggered anyway. If no match is running, a warning will be shown and the block will do nothing.

Input NameData TypeDefault Value
Team NameString""
New Scoreint0

Set Scoreboard Title

Sets the title of the scoreboard to the given text.

Input NameData TypeDefault Value
TitleString"Scoreboard"

Show Scoreboard

Shows the scoreboard for players. If Player Or All is not specified, the scoreboard is shown for all players. Note: In Build mode, at least one button will always be shown, to prevent soft-locking yourself.

Input NameData TypeDefault Value
Player Or AllObjectnull
Allow Closebooltrue
Allow New Matchboolfalse

Hide Scoreboard

Hides the scoreboard for players. If Player Or All is not specified, the scoreboard is hidden for all players.

Input NameData TypeDefault Value
Player Or AllObjectnull

Space

Space blocks are for getting information about the Space.

Get Space ID

Gets the ID of the current Space. This is a unique identifier that can be used to identify the Space.

Output NameData Type
Space IDString

Rotation Degrees

Rotation Degrees blocks are used to perform operations on Euler angle rotations in degrees.

Get Rotation Degrees

Gets the rotation in the form of Euler angles in degrees.

Input NameData TypeDefault Value
ObjectObjectnull
Output NameData Type
Rotation DegreesVector3

Set Rotation Degrees

Sets the rotation in the form of Euler angles in degrees.

Input NameData TypeDefault Value
ObjectObjectnull
Rotation DegreesVector3(0, 0, 0)

Tween Rotation Degrees

Tweens the rotation in the form of Euler angles in degrees over the given Duration with the given Transition and Easing.

Input NameData TypeDefault Value
ObjectObjectnull
Rotation DegreesVector3(0, 0, 0)
Durationfloat1.0
TransitionString"Linear"
EasingString"In Out"

Advanced

Advanced blocks are used to perform advanced operations.

Get Friendly Name

Gets the friendly name of the given Object. For SpaceObject, this will get the name shown in the inspector. For Player, this will get the player's display name.

Input NameData TypeDefault Value
ObjectObjectnull
Output NameData Type
Friendly NameString

Get Node Name Or ID

Gets the raw name of the given node. For SpaceObject and Player, this will return their unique ID.

Input NameData TypeDefault Value
ObjectObjectnull
Output NameData Type
Node Name or IDString

Attach Script

Attaches the given Space script entity to the given SpaceObject. The Script Name must be the name of a script already present in the Space. If the script is already attached, this block will silently exit and do nothing.

Input NameData TypeDefault Value
Space ObjectObjectnull
Script NameString""
Run In Build Modebooltrue
Run On Clientboolfalse
Run On Serverbooltrue

Is Server

Returns true if the script is running on the server, false otherwise.

Output NameData Type
Is Serverbool

Evaluate Now

Evaluates the given data script block(s) immediately. This is useful for controlling the evaluation order of data blocks. The connected input must be data block, not a run block. All inputs must be connected.

Input NameData TypeDefault Value
Input 1Connection (special)null
Output NameData Type
Output 1Variant

To Global

Converts a local vector (relative to this node) to a global vector (relative to the world origin).

Input NameData TypeDefault Value
On ObjectObjectnull
LocalVector3(0, 0, 0)
Output NameData Type
PassObject
GlobalVector3

To Local

Converts a global vector (relative to the world origin) to a local vector (relative to this node).

Input NameData TypeDefault Value
On ObjectObjectnull
GlobalVector3(0, 0, 0)
Output NameData Type
PassObject
LocalVector3

Damageable

Damageable blocks are used to hurt or heal damageable objects and players.

Damage

Damage the target object by the given amount. The object may be a SpaceObject or a Player. Amount should be positive, if you use a negative amount that will heal instead.

Input NameData TypeDefault Value
On ObjectObjectnull
Amountfloat20.0
Source Of DamageString"scripting"
Output NameData Type
PassObject

Heal

Heal the target object by the given amount. The object may be a SpaceObject or a Player. Amount should be positive, if you use a negative amount that will damage instead.

Input NameData TypeDefault Value
On ObjectObjectnull
Amountfloat20.0
Source Of HealingString"scripting"
Output NameData Type
PassObject

Revive

Revive the target object from death.

Input NameData TypeDefault Value
On ObjectObjectnull
Output NameData Type
PassObject

Properties

Properties all share a similar API. Properties can be get, set, and sometimes tweened, added to, and multiplied. If properties are set on the server, they will be synced to clients.

Property NameData TypeDefault ValueValid Values
Collision Enabledbooltrue
Physics Shape TypeString"Auto""Auto", "Convex", "Concave", "Model Shapes", "Multi Bodies"
Physics Body TypeString"Static""Static", "Kinematic", "Dynamic", "Trigger"
Massfloat1.0Greater than zero
Gravity Scalefloat1.0
Angular VelocityVector3(0, 0, 0)
Linear VelocityVector3(0, 0, 0)
Model OffsetVector3(0, 0, 0)
Model ScaleVector3(1, 1, 1)Non-zero
Space Object NameString""
Object ColorColor(0, 0, 0, 1)
Object Local TextureObjectnull
Material IdString""Valid ID
Object Texture SizeVector3(0, 0, 0)Greater than zero
Object Texture OffsetVector3(0, 0, 0)
PositionVector3(0, 0, 0)
Global PositionVector3(0, 0, 0)
Visiblebooltrue