-
Notifications
You must be signed in to change notification settings - Fork 321
reference_basic
This reference was generated automatically. Please do not edit the page directly, instead change the docstrings of the nodes in their Python files or the generator script and open a pull request. Thank you for contributing!
This reference was built for Armory 2023.11.
- Basic
- Data
- Motion
- Values
- Graphics
- Sound
- Misc
Logic nodes are used to control execution flow using branching, loops, gates etc.
Activates the outputs alternating every time it is active.
Activates its true
or false
output, according to the state of the plugged-in boolean.
Calls the given function that was created by the Function node.
Compare the given Compare
value with the other inputs for equality and return the index of the first match. This is particularly helpful in combination with the Select
node.
See also:
Inputs:
-
Compare
: the value to be compared -
Value
: values for the dynamic comparison
Outputs:
-
Index
: the index of the first equal value, ornull
if no equal value was found.
Creates a reusable function that can be called by the Call Function node.
Sets the return value for the given function.
See also:
Logic nodes way to do "if" statements. When activated, it compares if its two inputs are being Equal, Greater Equal, Less Equal, Not Equal, or Between, regardless of variable type, and passes through its active input to the output that matches the result of the comparison.
"And" and "Or" are being used for booleans only, and pass through the input when both booleans are true (And) or at least one (Or).
Inverts the plugged-in boolean. If its input is true
it outputs false
.
Activates the output if the input is not active.
Passes through its activation only if the plugged-in boolean equals false
.
See also:
Passes through its activation only if the plugged-in value is not null
.
See also:
Passes through its activation only if the plugged-in value is null
(no value).
See also:
Passes through its activation only if the plugged-in boolean equals true
.
See also:
Resembles a for-loop (for (i in from...to)
) that is executed at once when this node is activated.
See also:
Inputs:
-
From
: The value to start the loop from (inclusive) -
To
: The value to end the loop at (exclusive)
Outputs:
-
Loop
: Active at every iteration of the loop -
Index
: The index for the current iteration -
Done
: Activated once when the looping is done
Terminates the currently executing loop (only one loop is executed at once).
See also:
continues to the next loop.
See also:
Activates the output when at least one connected input is activated. If multiple inputs are active, the behaviour is specified by the Execution Mode
option.
Outputs:
-
Active Input Index
: [Available if Execution Mode is set to Once Per Input] The index of the last input that activated the output, -1 if there was no execution yet on the current frame.
Options:
-
Execution Mode
: The node's behaviour if multiple inputs are active on the same frame.-
Once Per Input
: If multiple inputs are active on one frame, activate the output for each active input individually (simple forwarding). -
Once Per Frame
: If multiple inputs are active on one frame, trigger the output only once.
-
-
New
: Add a new input socket. -
X Button
: Remove the lowermost input socket.
A null
value that can be used in comparisons and conditions.
Activates the output only once per frame if receives one or more inputs in that frame If there is no input, there will be no output
Activates the outputs one by one sequentially and repeatedly.
Converts a signal to a boolean value. If the input signal is active, the boolean is true
; if not, the boolean is false
.
Sends a signal repeatedly between the given time interval until you stop it.
Inputs:
-
Start
: Starts to send the signals -
Stop
: Stops to send the signals -
Interval
: The interval between the signals
Selects one of multiple values (of arbitrary types) based on some input state. The exact behaviour of this node is specified by the Execution Mode
option (see below).
Outputs:
-
Out
: [Available if Execution Mode is set to From Input] Activated after the node was executed. -
Value
: The last selected value. This value is not reset until the next execution of this node.
Options:
-
Execution Mode
: Specifies the condition that determines what value to choose.-
From Index
: Select the value at the given index. If there is no value at that index, the value plugged in to theDefault
input is used instead (null
if unconnected). -
From Input
: This mode uses input pairs of one action socket and one value socket. Depending on which action socket is activated, the associated value socket (the value with the same index as the activated action input) is forwarded to theValue
output.
-
-
New
: Add a new value to the list of values. -
X Button
: Remove the value with the highest index.
Activates the outputs depending of the value. If the "value" is equal to "case 1", the output "case 1" will be activated.
Outputs:
-
Default
: Activated if the input value does not match any case.
Upon activation through the In
input, this node checks whether the given value is different than the value from the last execution of this node.
Outputs:
-
Changed
: Activates if the value has changed compared to the last time the node was executed or if the node is executed for the first time and there is no value for comparison yet. -
Unchanged
: Activates if the value is the same as it was when the node was executed the last time. -
Is Initial
: Activates if the value is equal to the value at the first time the node was executed or if the node is executed for the first time. This output works independently of theChanged
orUnchanged
outputs.
Activate the output when all inputs have been activated at least once since the node's initialization. Use This node for parallel flows. Inputs don't need to be active at the same point in time.
Inputs:
-
Input[0-n]
: list of inputs to be activated
Outputs:
-
Output
: output triggered when all inputs are activated
Loops while the condition is true
.
See also:
Inputs:
-
Condition
: boolean that resembles the result of the condition
Outputs:
-
Loop
: Activated on every iteration step -
Done
: Activated when the loop is done executing
Listens to different application state changes.
Activates the output when the given event is received.
See also:
Activates the output on the first frame of execution of the logic tree.
Activates the output when logic tree is removed
Registers a 2D rendering callback to activate its output on each frame after the frame has been drawn and other non-2D render callbacks have been executed.
Activates the output when a given time elapsed (optionally repeating the timer).
Inputs:
-
Duration
: the time in seconds after which to activate the output -
Repeat
: whether to repeat the timer
Activates the output on every frame.
Options:
-
Update
: (default) activates the output every frame. -
Late Update
: activates the output after all non-late updates are calculated. -
Physics Pre-Update
: activates the output before calculating the physics. Only available when using a physics engine.
Sends a event to the given object.
See also:
Inputs:
-
Event
: the identifier of the event -
Object
: the receiving object
Sends the given event to all objects in the scene.
See also:
Inputs:
-
Event
: the identifier of the event
Detect cursor in specific region.
Inputs:
-
Center X/Y
: The position of the center in pixels. -
Width
: Width of the region in pixels. -
Height
: Height of the region in pixels. -
Angle
: Rotation angle in radians. Rotation is clockwise.
Outputs:
-
On Enter
: Activated after the cursor enters the region. -
On Exit
: Activated after the cursor exits the region. -
Is Inside
: True if inside the region. False otherwise.
Activates the output on the given gamepad event.
See also:
Inputs:
-
Gamepad
: the ID of the gamepad.
Options:
-
State
: the state of the gamepad button to listen to. -
Button
: the gamepad button that should activate the output.
Returns the coordinates of the given gamepad.
See also:
Inputs:
-
Gamepad
: the ID of the gamepad.
Activates the output on the given gamepad event.
See also:
Inputs:
-
Gamepad
: the ID of the gamepad.
Options:
-
state
: the state of the gamepad stick to listen to. -
stick
: the gamepad stick that should activate the output. -
axis
: the gamepad stick axis value
Returns the mouse cursor location in screen coordinates (pixels).
Returns the state of the mouse cursor.
See also:
Outputs:
-
Is Hidden Locked
:true
if the mouse cursor is both hidden and locked. -
Is Hidden
:true
if the mouse cursor is hidden. -
Is Locked
:true
if the mouse cursor is locked.
.
Get key data if it exists in the input map.
.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Get Cursor State
.
Deprecated. It is recommended to use the 'Get Cursor State' node instead.
Get the movement coordinates of the mouse and the mouse wheel delta. The multiplied output variants default to -1 to invert the values.
.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Get Cursor State
.
Deprecated. It is recommended to use the 'Get Cursor State' node instead.
Returns the location of the last touch event in screen coordinates (pixels).
Returns the movement values of the current touch event.
Activates the output on the given keyboard button event.
Activates the output on the given mouse event.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Get Cursor Location
.
Deprecated. It is recommended to use 'Get Cursor Location' node and the 'Get Mouse Movement' node instead.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Gamepad
.
Deprecated. It is recommended to use the 'Gamepad' node instead.
Send a signal if any input map key is started or released.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Keyboard
.
Deprecated. It is recommended to use the 'Keyboard' node instead.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Mouse
.
Deprecated. It is recommended to use the 'Mouse' node instead.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Surface
.
Deprecated. Is recommended to use the 'Surface' node instead.
Activates the output on the given swipe event.
Activates the output on tap screen event.
Inputs:
-
Duration
: touching time -
Interval
: interval between taps -
Repeat
: repetitions amount to validate
Outputs:
-
Done
: the sequence success -
Fail
: the the sequence failure -
Tap Number
: number of the last tap -
Coords
: the coordinates of the last tap
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Virtual Button
.
Deprecated. Is recommended to use 'Virtual Button' node instead.
Remove input map key.
TO DO.
Sets the state of the mouse cursor.
See also:
Options:
-
Hide Locked
: hide and lock or unhide and unlock the mouse cursor. -
Hide
: hide/unhide the mouse cursor. -
Lock
: lock/unlock the mouse cursor.
Set input map key.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Set Cursor State
.
Deprecated. It is recommended to use the 'Set Cursor State' node instead.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Set Cursor State
.
Deprecated. It is recommended to use the 'Set Cursor State' node instead.
DEPRECATED. This node is deprecated and will be removed in future versions of Armory. Please use the following node(s) instead:
Get Touch Movement
,Get Touch Location
.
Deprecated. Is recommended to use 'Get Touch Location' and 'Get Touch Movement' node instead.
Activates the output on the given touch event.
Detect touch in specific region.
Inputs:
-
Center X/Y
: The position of the center in pixels. -
Width
: Width of the region in pixels. -
Height
: Height of the region in pixels. -
Angle
: Rotation angle in radians. Rotation is clockwise.
Outputs:
-
On Enter
: Activated after the cursor enters the region. -
On Exit
: Activated after the cursor exits the region. -
Is Inside
: True if inside the region. False otherwise.
Activates the output on the given virtual button event.
The Native category contains nodes which interact with the system (Input/Output functionality, etc.) or Haxe.
Calls the given static Haxe function and optionally passes arguments to it.
Compatibility info: prior versions of this node didn't accept arguments and instead implicitly passed the current logic tree object as the first argument. In newer versions you need to pass that argument explicitly if the called function expects it.
Inputs:
-
Function
: the full module path to the function.
Outputs:
-
Result
: the result of the function.
Clears the system console.
Determines the mobile browser or not (works only for web browsers).
Evaluates a Haxe expression and returns its output.
Outputs:
-
Result
: the result of the expression.
Returns the values of the current date and time.
Returns a property of an Haxe object (via the Reflection API).
See also:
Returns the language of the current system.
Returns the name of the current system.
Load the given URL in a new tab (works only for web browsers).
Print the given value to the console.
Reads the given file and returns its content.
See also:
Inputs:
-
File
: the asset name of the file as used by Kha. -
Use cache
: if unchecked, re-read the file from disk every time the node is executed. Otherwise, cache the file after the first read and return the cached content.
Outputs:
-
Loaded
: activated after the file has been read. If the file doesn't exist, the output is not activated. -
Content
: the content of the file.
Reads the given JSON file and returns its content.
See also:
Inputs:
-
File
: the asset name of the file as used by Kha. -
Use cache
: if unchecked, re-read the file from disk every time the node is executed. Otherwise, cache the file after the first read and return the cached content.
Outputs:
-
Loaded
: activated after the file has been read. If the file doesn't exist, the output is not activated. -
Dynamic
: the content of the file.
Reads a value from the application's default storage file. Each value is uniquely identified by a key.
For a detailed explanation of the storage system, please read the documentation for the Write Storage
node.
See also:
Executes the given script.
Sets a property of an Haxe object (via the Reflection API).
See also:
Pulses the vibration hardware on the device for time in milliseconds, if such hardware exists.
Closes the application.
Writes the given string content to the given file. If the file already exists, the existing content of the file is overwritten.
This node is currently only implemented on Krom
See also:
Inputs:
-
File
: the name of the file, relative toKrom.getFilesLocation()
-
Content
: the content to write to the file.
Writes the given content to the given JSON file. If the file already exists, the existing content of the file is overwritten.
This node is currently only implemented on Krom
See also:
Inputs:
-
File
: the name of the file, relative toKrom.getFilesLocation()
, including the file extension. -
Dynamic
: the content to write to the file. Can be any type that can be serialized to JSON.
Writes a given value to the application's default storage file. Each value is uniquely identified by a key, which can be used to later read the value from the storage file.
Each key can only refer to one value, so writing a second value with a key that is already used overwrites the already stored value with the second value.
The location of the default storage file varies on different platforms, as implemented by the Kha storage API:
-
Windows:
%USERPROFILE%/Saved Games/<application name>/default.kha
-
Linux: one of
$HOME/.<application name>/default.kha
,$XDG_DATA_HOME/.<application name>/default.kha
or$HOME/.local/share/default.kha
-
MacOS:
~/Library/Application Support/<application name>/default.kha
-
iOS:
~/Library/Application Support/<application name>/default.kha
-
Android:
<internalDataPath>/<application package name>/files/default.kha
- HTML 5: saved in the local storage (web storage API) for the project's origin.
<application name>
refers to the name set at Armory Exporter > Name
, <application package name>
is the generated package name on Android.
See also: