Lua API: Nodes
Every node type’s methods (on self.node or any node). Properties are fields too: node.position = Vec2(10, 20).
Represents an engine scene hierarchy node with transform, lifecycle, and optional physics.
| Field | Type | |
|---|---|---|
name |
string |
The node’s name (assigning renames it). Properties read and write as fields: node.rotation = node.rotation + 5. |
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
Node:get_type()
Section titled “Node:get_type()”Gets the concrete runtime type of the node (e.g. “Node”, “TextureNode”, “DynamicBodyNode”, “CameraNode”).
if self.node:get_type() == "DynamicBodyNode" then Log.info("physics body") endReturns string
Node:get_name()
Section titled “Node:get_name()”Gets the display/debug name of the node.
Log.info("Spawned " .. self.node:get_name())Returns string
Node:set_name(name)
Section titled “Node:set_name(name)”Sets the display/debug name of the node.
self.node:set_name("Enemy_" .. tostring(index))namestring
Node:get_position()
Section titled “Node:get_position()”Gets the local position of the node.
local x, y = self.node:get_position()Returns number x Local X position, number y Local Y position
Node:set_position(x, y)
Section titled “Node:set_position(x, y)”Sets the local position of the node.
self.node:set_position(320, 180)xnumberLocal X positionynumberLocal Y position
Node:translate(dx, dy)
Section titled “Node:translate(dx, dy)”Translates the node position by the given delta offset.
self.node:translate(self.speed * dt, 0)dxnumberDelta XdynumberDelta Y
Node:get_rotation()
Section titled “Node:get_rotation()”Gets the local rotation of the node in degrees.
local angle = self.node:get_rotation()Returns number rotation Rotation in degrees
Node:set_rotation(degrees)
Section titled “Node:set_rotation(degrees)”Sets the local rotation of the node in degrees.
self.node:set_rotation(90)degreesnumberRotation in degrees
Node:rotate(degrees)
Section titled “Node:rotate(degrees)”Rotates the node by delta degrees.
self.node:rotate(180 * dt)degreesnumberDelta degrees
Node:get_scale()
Section titled “Node:get_scale()”Gets the local scale factor of the node.
local sx, sy = self.node:get_scale()Returns number sx Scale X, number sy Scale Y
Node:set_scale(sx, sy)
Section titled “Node:set_scale(sx, sy)”Sets the local scale factor of the node.
self.node:set_scale(-1, 1)sxnumberScale Xsy?numberScale Y (defaults to sx if omitted)
Node:get_global_position()
Section titled “Node:get_global_position()”Gets the world-space global position of the node calculated from parent transforms.
local gx, gy = self.node:get_global_position()Returns number x Global world X position, number y Global world Y position
Node:get_global_rotation()
Section titled “Node:get_global_rotation()”Gets the world-space global rotation of the node in degrees.
local world_angle = self.node:get_global_rotation()Returns number rotation Global world rotation in degrees
Node:is_enabled()
Section titled “Node:is_enabled()”Checks if the node is actively updated in the scene loop.
if not self.node:is_enabled() then return endReturns boolean
Node:set_enabled(enabled)
Section titled “Node:set_enabled(enabled)”Enables or disables updates for the node and its children.
Scene.find_node("Enemy"):set_enabled(false)enabledboolean
Node:is_visible()
Section titled “Node:is_visible()”Checks if the node is rendered in the scene draw loop.
local shown = self.node:is_visible()Returns boolean
Node:set_visible(visible)
Section titled “Node:set_visible(visible)”Sets whether the node is rendered.
self.node:get_node("Shield"):set_visible(true)visibleboolean
Node:get_parent()
Section titled “Node:get_parent()”Gets the parent node, or nil if this is a root node.
local parent = self.node:get_parent(); if parent then Log.info(parent:get_name()) endReturns Node?
Node:get_children()
Section titled “Node:get_children()”Returns an array of all direct child nodes.
for _, child in ipairs(self.node:get_children()) do child:set_visible(false) endReturns Node[]
Node:add_tag(tag)
Section titled “Node:add_tag(tag)”Adds a tag (group) to the node; false when it already has it.
self.node:add_tag("enemies")tagNodeTag|string
Returns boolean
Node:remove_tag(tag)
Section titled “Node:remove_tag(tag)”Removes a tag (group) from the node; returns false when it did not have it.
local removed = self.node:remove_tag("enemies")tagNodeTag|string
Returns boolean removed
Node:has_tag(tag)
Section titled “Node:has_tag(tag)”Checks whether the node has the given tag (group).
if other:has_tag("player") then self:collect() endtagNodeTag|string
Returns boolean
Node:get_tags()
Section titled “Node:get_tags()”Returns an array of all tags (groups) on the node.
for _, tag in ipairs(self.node:get_tags()) do Log.info(tag) endReturns string[]
Node:get_child(name)
Section titled “Node:get_child(name)”Finds a direct child node by its exact name.
local sprite = self.node:get_child("Sprite")nameNodeName|string
Returns Node?
Node:get_node(path)
Section titled “Node:get_node(path)”Finds a node by path relative to this one: “Gun”, “Body/Gun”, “../Player”, “.” (self).
local gun = self.node:get_node("Body/Gun")pathstringRelative node path
Returns Node? node The node, or nil if there is none
Node:add_child(child)
Section titled “Node:add_child(child)”Reparents a child node under this node.
local item = Scene.find_node("Key"); self.node:add_child(item)childNode
Node:remove_child(child)
Section titled “Node:remove_child(child)”Detaches a child node from this node.
self.node:remove_child(self.node:get_child("Shield"))childNode
Node:destroy()
Section titled “Node:destroy()”Removes this node and all its children from the active scene (at the end of the frame, so it’s safe from its own update).
self.node:destroy()Node:queue_free()
Section titled “Node:queue_free()”Removes this node and its children at the end of the frame (= destroy).
if self.health <= 0 then self.node:queue_free() endNode:connect(event, handler)
Section titled “Node:connect(event, handler)”Connects a handler to an event of this node (from any script). Handlers
are removed automatically when the connecting script or this node is
destroyed. A script also receives its own node’s events as methods named
on_<event> (e.g. function MyScript:on_timeout() end).
self.conn = timer:connect("timeout", function(value, source) self:fire() end)eventNodeEvent|ProjectEvent|stringEvent name (custom ones: the project’semitnames)handlerfun(value:any, source: Node) Called with the event value and this node
Returns integer id Connection id for disconnect
Node:disconnect(id)
Section titled “Node:disconnect(id)”Removes a connection made with connect.
local removed = timer:disconnect(self.conn)idintegerConnection id
Returns boolean removed
Node:emit(event, value)
Section titled “Node:emit(event, value)”Raises a custom event on this node: calls the node script’s on_<event>
method and every handler connected to that event name.
self.node:emit("health_changed", self.health)eventProjectEvent|stringEvent name (the project’s custom events complete)value?anyValue passed to handlers
Node:get_property(path)
Section titled “Node:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("position")pathNodeProperty|string
Returns any
Node:set_property(path, value, y)
Section titled “Node:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("position", 100, 50)pathNodeProperty|stringvalueanyy?number
Node:set_shader(shader)
Section titled “Node:set_shader(shader)”Sets the node’s shader: a built-in or a project fragment shader (.fs). nil removes it.
self.node:set_shader("builtin:flash")shaderBuiltinShader|string|nil
Node:set_shader_param(name, x, y, z, w)
Section titled “Node:set_shader_param(name, x, y, z, w)”Sets a shader parameter (a uniform of the shader): a number, up to four numbers, a table {r, g, b, a} / {x, y}, or a texture path.
self.node:set_shader_param("amount", 0.8)namestringxnumber|number[]|stringy?numberz?numberw?number
Node:get_shader_param(name)
Section titled “Node:get_shader_param(name)”Gets a shader parameter (its value, else the shader’s default): up to four numbers, or the texture path.
local amount = self.node:get_shader_param("amount")namestring
Returns number|string|nil x, number? y, number? z, number? w
Node:set_blend_mode(mode)
Section titled “Node:set_blend_mode(mode)”Sets how the node is blended with what’s behind it.
self.node:set_blend_mode("additive")modeBlendMode
Node:get_script()
Section titled “Node:get_script()”The node’s script instance - the self its script sees: read or change its
fields and call its methods (enemy:get_script():take_damage(10)). nil
when the node has no script.
local enemy = Scene.find_node("Enemy"); enemy:get_script():take_damage(10)Returns table?
Node:set_paused(paused)
Section titled “Node:set_paused(paused)”Pauses this node and its children (except “always” ones).
Scene.find_node("Enemies"):set_paused(true)pausedboolean
Node:is_paused()
Section titled “Node:is_paused()”Checks whether the node is paused, by itself, a parent or the game.
if self.node:is_paused() then return endReturns boolean paused By itself, a parent or the game
Node:set_pause_mode(mode)
Section titled “Node:set_pause_mode(mode)”Sets how the node reacts to pausing: inherit from its parent, pausable, or always running.
self.node:set_pause_mode("always")mode"inherit"|"pausable"|"always"
Node:set_collision_layer(…)
Section titled “Node:set_collision_layer(…)”The collision layers this body’s shapes are on: project layer names (Project Settings > Physics), “LayerN” or numbers 1-16; several or a table.
self.node:set_collision_layer("player")...CollisionLayer|string|integer|table
Node:set_collision_mask(…)
Section titled “Node:set_collision_mask(…)”The collision layers this body’s shapes collide with.
self.node:set_collision_mask("world", "enemies")...CollisionLayer|string|integer|table
CameraNode
Section titled “CameraNode”Inherits Node
The camera the scene is seen through (follow, zoom, shake, limits).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
isCurrent |
boolean |
The camera the game renders through (one per scene). |
followMode |
"Static"|"SingleTarget"|"MultiTarget"|"Manual" |
Static: stays put. Single Target: follows its Follow Target. Multi Target: frames all t… |
dragType |
"None"|"SmoothDamp"|"SpringDamp"|"LookAhead"|"AutoSpeed" |
How the camera catches up with its target: none (locked), smooth damp, spring, look-ahe… |
targetPosition |
Vec2 |
Where the camera is heading (world px). |
currentPosition |
Vec2 |
Where the camera is now (world px). |
smoothDrag |
boolean |
Ease towards the target instead of snapping. |
smoothDragSpeed |
Vec2 |
Smooth-damp time per axis (s): higher lags more. |
springConstant |
number |
Spring Damp: stiffness pulling the camera to the target. |
dampingRatio |
number |
Spring Damp: 1 settles without overshoot, lower wobbles. |
predictionTime |
Vec2 |
Look Ahead: how far ahead of the target to aim, in seconds of its velocity. |
maxDistance |
Vec2 |
Reserved (not used yet). |
offset |
Vec2 |
Added to the target position (world px). |
smoothOffset |
boolean |
Ease offset changes in. |
smoothOffsetSpeed |
number |
How fast offset changes ease in. |
screenOffset |
Vec2 |
Where on screen the camera’s position appears (px; half the window = centred). |
currentRotation |
number |
The camera’s rotation now (degrees). |
targetRotation |
number |
Rotation the camera turns to (degrees). |
allowRotation |
boolean |
Let the camera rotate (else it stays upright). |
smoothRotation |
boolean |
Ease rotation changes in. |
smoothRotationSpeed |
number |
How fast rotation eases in. |
zoom |
number |
Zoom now (1 = 100%, 2 = everything twice as big). |
targetZoom |
number |
Zoom the camera eases to. |
smoothZoom |
boolean |
Ease zoom changes in. |
smoothZoomSpeed |
number |
How fast zoom eases in. |
minZoom |
number |
Smallest zoom (auto zoom and scripts). |
maxZoom |
number |
Largest zoom (auto zoom and scripts). |
autoZoom |
boolean |
Multi Target: zoom out to keep every target on screen. |
zoomMargin |
number |
Auto zoom: extra space around the targets (0.1 = 10%). |
hasLimits |
boolean |
Keep the view inside the left / right / top / bottom limits. |
smoothLimit |
boolean |
Ease into the limits instead of stopping hard. |
leftLimit |
number |
Left edge the view may not pass (world px). |
rightLimit |
number |
Right edge the view may not pass (world px). |
topLimit |
number |
Top edge the view may not pass (world px). |
bottomLimit |
number |
Bottom edge the view may not pass (world px). |
useHMargins |
boolean |
Dead zone: the target moves freely between the left / right margins before the camera f… |
useVMargins |
boolean |
Dead zone: the target moves freely between the top / bottom margins before the camera f… |
leftMargin |
number |
Left dead-zone margin (fraction of the screen). |
rightMargin |
number |
Right dead-zone margin (fraction of the screen). |
topMargin |
number |
Top dead-zone margin (fraction of the screen). |
bottomMargin |
number |
Bottom dead-zone margin (fraction of the screen). |
enableMouseFollow |
boolean |
Nudge the camera towards the mouse. |
mouseInfluence |
Vec2 |
How much the mouse pulls the camera per axis (0-1). |
shakePreset |
"Custom"|"Gunshot"|"Earthquake"|"Handheld"|"Explosion"|"Impact"|"Rumble"|"Vibration"|"Wobbly" |
Ready-made shake (gunshot, earthquake…); Custom uses the settings below. |
isShaking |
boolean |
A shake is running. |
shakeSpeed |
number |
Custom shake: how fast it shakes. |
shakeIntensity |
number |
Custom shake: how far it moves (px). |
shakeTrauma |
number |
Shake strength now (0-1); decays over time. |
CameraNode:get_property(path)
Section titled “CameraNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("isCurrent")pathCameraNodeProperty|string
Returns any
CameraNode:set_property(path, value, y)
Section titled “CameraNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("isCurrent", true)pathCameraNodeProperty|stringvalueanyy?number
CameraNode:camera_set_zoom(zoom)
Section titled “CameraNode:camera_set_zoom(zoom)”Sets the zoom level on this CameraNode.
local cam = Scene.find_node("MainCamera"); cam:camera_set_zoom(2.0)zoomnumber
CameraNode:camera_get_zoom()
Section titled “CameraNode:camera_get_zoom()”Gets the configured zoom level on this CameraNode.
local cam = Scene.find_node("MainCamera"); cam:camera_set_zoom(cam:camera_get_zoom() * 1.1)Returns number
CameraNode:camera_set_target(target)
Section titled “CameraNode:camera_set_target(target)”Sets the target Node to follow.
local cam = Scene.find_node("MainCamera"); cam:camera_set_target(Scene.find_node("Player"))targetNode?
CameraNode:camera_add_target(target, options)
Section titled “CameraNode:camera_add_target(target, options)”Adds a node to the group this camera frames (see Camera.add_target).
local cam = Scene.find_node("MainCamera"); cam:camera_add_target(Scene.find_node("Boss"), {weight = 2})targetNodeoptions?CameraTargetOptions
CameraNode:camera_remove_target(target)
Section titled “CameraNode:camera_remove_target(target)”Takes a node out of this camera’s group.
local cam = Scene.find_node("MainCamera"); cam:camera_remove_target(Scene.find_node("Boss"))targetNode
CameraNode:camera_clear_targets()
Section titled “CameraNode:camera_clear_targets()”Stops this camera following anything.
local cam = Scene.find_node("MainCamera"); cam:camera_clear_targets()CameraNode:camera_get_target()
Section titled “CameraNode:camera_get_target()”The node this camera follows (single target), or nil.
local cam = Scene.find_node("MainCamera"); local target = cam:camera_get_target()Returns Node?
CameraNode:camera_get_targets()
Section titled “CameraNode:camera_get_targets()”Every node this camera follows.
local cam = Scene.find_node("MainCamera"); for _, t in ipairs(cam:camera_get_targets()) do Log.info(t.name) endReturns Node[]
CameraNode:camera_set_target_position(x, y)
Section titled “CameraNode:camera_set_target_position(x, y)”Sets the fixed world position for the camera target.
local cam = Scene.find_node("MainCamera"); cam:camera_set_target_position(640, 360)xnumberynumber
CameraNode:camera_shake(strength, duration)
Section titled “CameraNode:camera_shake(strength, duration)”Triggers trauma screen shake on this CameraNode.
local cam = Scene.find_node("MainCamera"); cam:camera_shake(0.6, 0.3)strengthnumberShake intensity (0.0 to 1.0)duration?numberDuration in seconds (default 0.5)
CameraNode:camera_stop_shake()
Section titled “CameraNode:camera_stop_shake()”Immediately cancels any active screen shake.
local cam = Scene.find_node("MainCamera"); cam:camera_stop_shake()CameraNode:camera_is_shaking()
Section titled “CameraNode:camera_is_shaking()”Checks if screen shake is currently active.
local cam = Scene.find_node("MainCamera"); if not cam:camera_is_shaking() then cam:camera_shake(0.4) endReturns boolean
CameraNode:camera_set_limits(left, right, top, bottom)
Section titled “CameraNode:camera_set_limits(left, right, top, bottom)”Constrains camera movement within bounding rectangle limits.
local cam = Scene.find_node("MainCamera"); cam:camera_set_limits(0, 2560, 0, 720)leftnumberrightnumbertopnumberbottomnumber
CameraNode:camera_clear_limits()
Section titled “CameraNode:camera_clear_limits()”Clears all bounding rectangle limits.
local cam = Scene.find_node("MainCamera"); cam:camera_clear_limits()TimerNode
Section titled “TimerNode”Inherits Node
Counts down and raises “timeout”.
TimerNode:connect(event, handler)
Section titled “TimerNode:connect(event, handler)”Connects a handler to one of this node’s events: tick (Every frame while the timer runs), timeout (The timer’s duration elapsed); the tree events; custom ones.
self.node:connect("tick", function(value, source) Log.info("tick") end)eventTimerNodeEvent|stringhandlerfun(value:any, source: TimerNode)
Returns integer id Connection id for disconnect
TimerNode:timer_start()
Section titled “TimerNode:timer_start()”Starts or restarts the timer from zero.
local timer = self.node:get_node("Cooldown"); timer:timer_start()TimerNode:timer_stop()
Section titled “TimerNode:timer_stop()”Stops the timer.
self.node:get_node("Cooldown"):timer_stop()TimerNode:timer_is_running()
Section titled “TimerNode:timer_is_running()”Checks if the timer is actively running.
if self.node:get_node("Cooldown"):timer_is_running() then return endReturns boolean
TimerNode:timer_get_elapsed()
Section titled “TimerNode:timer_get_elapsed()”Gets the elapsed time in seconds since start.
local t = self.node:get_node("Cooldown"):timer_get_elapsed()Returns number
TimerNode:timer_set_duration(durationSec)
Section titled “TimerNode:timer_set_duration(durationSec)”Sets the timer expiration duration in seconds.
self.node:get_node("Cooldown"):timer_set_duration(0.5)durationSecnumber
TimerNode:timer_set_loop(loop)
Section titled “TimerNode:timer_set_loop(loop)”Sets whether the timer automatically restarts upon expiring.
self.node:get_node("SpawnTimer"):timer_set_loop(true)loopboolean
TextureNode
Section titled “TextureNode”Inherits Node
A sprite: draws an image.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
tint |
number[] |
Multiplies the texture’s colours (white = unchanged; alpha fades it). |
TextureNode:set_texture(path)
Section titled “TextureNode:set_texture(path)”Shows another image on a TextureNode (project-relative path, e.g. a
texture script property). Returns false if it isn’t a TextureNode or
the file can’t be loaded.
local sprite = self.node:get_node("Sprite"); sprite:set_texture("textures/coin.png")pathTexturePath|stringProject-relative texture path
Returns boolean ok
TextureNode:get_property(path)
Section titled “TextureNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("tint")pathTextureNodeProperty|string
Returns any
TextureNode:set_property(path, value, y)
Section titled “TextureNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("tint", "#ff8800")pathTextureNodeProperty|stringvalueanyy?number
TextureNode:texture_get_size()
Section titled “TextureNode:texture_get_size()”Gets the base unscaled pixel width and height of the texture.
local w, h = self.node:get_node("Sprite"):texture_get_size()Returns number width, number height
TextureNode:texture_set_origin(ox, oy)
Section titled “TextureNode:texture_set_origin(ox, oy)”Sets the origin (what it rotates and scales around) in pixels of the image; stored as a fraction of it - set_property(“origin”, fx, fy) takes that.
local sprite = self.node:get_node("Sprite"); sprite:texture_set_origin(16, 16)oxnumberOrigin X in pixelsoynumberOrigin Y in pixels
TextureNode:texture_get_path()
Section titled “TextureNode:texture_get_path()”Gets the file path string from which this texture was loaded.
local path = self.node:get_node("Sprite"):texture_get_path()Returns string
FrameAnimationNode
Section titled “FrameAnimationNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
FrameAnimationNode:connect(event, handler)
Section titled “FrameAnimationNode:connect(event, handler)”Connects a handler to one of this node’s events: animation_finished (A non-looping animation ended (Aseprite: a tag’s repeats are done)); the tree events; custom ones.
self.node:connect("animation_finished", function(value, source) Log.info("animation_finished") end)eventFrameAnimationNodeEvent|stringhandlerfun(value:any, source: FrameAnimationNode)
Returns integer id Connection id for disconnect
FrameAnimationNode:get_property(path)
Section titled “FrameAnimationNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("position")pathFrameAnimationNodeProperty|string
Returns any
FrameAnimationNode:set_property(path, value, y)
Section titled “FrameAnimationNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("position", 100, 50)pathFrameAnimationNodeProperty|stringvalueanyy?number
AnimationPlayerNode
Section titled “AnimationPlayerNode”Inherits Node
Plays frame / sprite-sheet animations with property tracks.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
reverse |
boolean |
Play the animation backwards. |
autoplay |
boolean |
Start playing the current animation when the node becomes ready. |
fps |
number |
Frames per second of the animations that don’t set their own (the Animation tab’s FPS b… |
defaultAnimation |
string |
The animation selected (and autoplayed) when the scene loads; empty = the one saved as … |
AnimationPlayerNode:connect(event, handler)
Section titled “AnimationPlayerNode:connect(event, handler)”Connects a handler to one of this node’s events: animation_finished (A non-looping animation ended (Aseprite: a tag’s repeats are done)), animation_event (A Method key of the animation fired (its method name)); the tree events; custom ones.
self.node:connect("animation_finished", function(value, source) Log.info("animation_finished") end)eventAnimationPlayerNodeEvent|stringhandlerfun(value:any, source: AnimationPlayerNode)
Returns integer id Connection id for disconnect
AnimationPlayerNode:get_property(path)
Section titled “AnimationPlayerNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("reverse")pathAnimationPlayerNodeProperty|string
Returns any
AnimationPlayerNode:set_property(path, value, y)
Section titled “AnimationPlayerNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("reverse", true)pathAnimationPlayerNodeProperty|stringvalueanyy?number
AnimationPlayerNode:animation_play(name, blend)
Section titled “AnimationPlayerNode:animation_play(name, blend)”Plays an animation, optionally switching to the specified animation name first.
With blend > 0 the previous pose crossfades into the new animation over that many seconds.
Event tracks fire while playing: method tracks call self:<method>(frame) on the
track’s target node script; sound tracks play their audio file on the key’s frame.
self.node:get_node("AnimationPlayer"):animation_play("run", 0.15)name?AnimationName|stringAnimation name (the project’s complete)blend?numberCrossfade time in seconds (default 0)
AnimationPlayerNode:animation_stop()
Section titled “AnimationPlayerNode:animation_stop()”Stops animation playback and freezes at current frame.
self.node:get_node("AnimationPlayer"):animation_stop()AnimationPlayerNode:animation_pause()
Section titled “AnimationPlayerNode:animation_pause()”Pauses animation playback.
self.node:get_node("AnimationPlayer"):animation_pause()AnimationPlayerNode:animation_resume()
Section titled “AnimationPlayerNode:animation_resume()”Resumes animation playback from the current frame.
self.node:get_node("AnimationPlayer"):animation_resume()AnimationPlayerNode:animation_reset()
Section titled “AnimationPlayerNode:animation_reset()”Resets the animation to the first frame.
self.node:get_node("AnimationPlayer"):animation_reset()AnimationPlayerNode:animation_set_fps(fps)
Section titled “AnimationPlayerNode:animation_set_fps(fps)”Sets playback speed in frames per second.
self.node:get_node("AnimationPlayer"):animation_set_fps(12)fpsnumber
AnimationPlayerNode:animation_get_current()
Section titled “AnimationPlayerNode:animation_get_current()”Gets the name of the currently active animation track.
local current = self.node:get_node("AnimationPlayer"):animation_get_current()Returns string
StateMachineNode
Section titled “StateMachineNode”Inherits Node
A finite state machine.
StateMachineNode:connect(event, handler)
Section titled “StateMachineNode:connect(event, handler)”Connects a handler to one of this node’s events: state_changed (The state machine entered a state); the tree events; custom ones.
self.node:connect("state_changed", function(value, source) Log.info("state_changed") end)eventStateMachineNodeEvent|stringhandlerfun(value:any, source: StateMachineNode)
Returns integer id Connection id for disconnect
StateMachineNode:sm_set(name, value)
Section titled “StateMachineNode:sm_set(name, value)”Sets a parameter that transition conditions test (booleans become 1 / 0).
local sm = self.node:get_node("StateMachine"); sm:sm_set("on_floor", true)nameStateMachineParam|stringvaluenumber|boolean
StateMachineNode:sm_get(name)
Section titled “StateMachineNode:sm_get(name)”Gets the value of a state machine parameter.
local speed = self.node:get_node("StateMachine"):sm_get("speed")nameStateMachineParam|string
Returns number value
StateMachineNode:sm_trigger(name)
Section titled “StateMachineNode:sm_trigger(name)”Sets a trigger: a one-shot event such as a button press. A trigger is a parameter
(Inspector > Parameters, starting value 0) that a condition tests with the
trigger operator (the condition row’s second dropdown). This sets it to 1; it
stays set (also while a guard blocks the change) until a transition testing it
fires, which resets it to 0. An arrow with no conditions fires at once, so give an
arrow a trigger condition to change state only when the script says.
if Input.is_action_pressed("fire") then self.node:get_node("StateMachine"):sm_trigger("punch") endnameStateMachineParam|string
StateMachineNode:sm_travel(state, blend)
Section titled “StateMachineNode:sm_travel(state, blend)”Switches to a state now, ignoring conditions.
local ok = self.node:get_node("StateMachine"):sm_travel("hurt", 0.1)stateStateMachineState|stringblend?numberCrossfade seconds for the state’s animation
Returns boolean ok false when there is no such state
StateMachineNode:sm_request(state, blend)
Section titled “StateMachineNode:sm_request(state, blend)”Asks to go to a state: allowed when an arrow leads there from the current state (or from Any state) and the guards agree (the current state’s leave rules - leave after, interruptible, its leave conditions, can_exit_
local ok, why = self.node:get_node("StateMachine"):sm_request("dash")stateStateMachineState|stringblend?numberCrossfade seconds (default: the arrow’s)
Returns boolean ok true when it changed state, string? reason why not (e.g. “attack: leave after 0.4s (0.12s so far)”)
StateMachineNode:sm_state()
Section titled “StateMachineNode:sm_state()”Gets the name of the current state.
if self.node:get_node("StateMachine"):sm_state() == "attack" then return endReturns string state The current state (“” before it starts)
StateMachineNode:sm_previous()
Section titled “StateMachineNode:sm_previous()”Gets the name of the state before the current one.
local prev = self.node:get_node("StateMachine"):sm_previous()Returns string state The state before the current one
StateMachineNode:sm_history()
Section titled “StateMachineNode:sm_history()”The last state changes (up to 32), oldest first.
for _, c in ipairs(self.node:get_node("Brain"):sm_history()) do Log.info(c.from, "->", c.to, c.why) endReturns SM_Change[] changes
StateMachineNode:sm_time()
Section titled “StateMachineNode:sm_time()”Gets the time in seconds spent in the current state.
if self.node:get_node("StateMachine"):sm_time() > 2 then self:give_up() endReturns number seconds Time spent in the current state
StateMachineNode:sm_start(state)
Section titled “StateMachineNode:sm_start(state)”Starts (or restarts) in a state, or in the initial state.
self.node:get_node("StateMachine"):sm_start("idle")state?string
StateMachineNode:sm_stop()
Section titled “StateMachineNode:sm_stop()”Stops checking transitions (the current state stays).
self.node:get_node("StateMachine"):sm_stop()ParticleEmitterNode
Section titled “ParticleEmitterNode”Inherits Node
A particle effect.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
ParticleEmitterNode:get_property(path)
Section titled “ParticleEmitterNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("position")pathParticleEmitterNodeProperty|string
Returns any
ParticleEmitterNode:set_property(path, value, y)
Section titled “ParticleEmitterNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("position", 100, 50)pathParticleEmitterNodeProperty|stringvalueanyy?number
ParticleEmitterNode:particle_start()
Section titled “ParticleEmitterNode:particle_start()”Starts continuous or burst particle emission.
self.node:get_node("Sparks"):particle_start()ParticleEmitterNode:particle_stop()
Section titled “ParticleEmitterNode:particle_stop()”Stops particle emission.
self.node:get_node("Sparks"):particle_stop()ParticleEmitterNode:particle_is_emitting()
Section titled “ParticleEmitterNode:particle_is_emitting()”Checks if particles are actively being emitted.
local fx = self.node:get_node("Smoke"); if not fx:particle_is_emitting() then fx:particle_start() endReturns boolean
ParticleEmitterNode:particle_set_amount(amount)
Section titled “ParticleEmitterNode:particle_set_amount(amount)”Sets the maximum particle pool count for this emitter.
self.node:get_node("Sparks"):particle_set_amount(64)amountinteger
ParticleEmitterNode:particle_set_lifetime(lifetime)
Section titled “ParticleEmitterNode:particle_set_lifetime(lifetime)”Sets the base lifetime in seconds for newly spawned particles.
self.node:get_node("Sparks"):particle_set_lifetime(1.5)lifetimenumber
SoundNode
Section titled “SoundNode”Inherits Node
A sound effect.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
volume |
number |
Volume (0-1), before the bus and master volumes. |
pitch |
number |
Playback speed / pitch (1 = normal). |
bus |
string |
The mixer bus it plays into (the Mixer tab; empty = SFX): its fader, effects and output… |
caption |
string |
Shown on the subtitle track when it plays, for players with sound captions on (e.g. “[d… |
autoplay |
boolean |
Play once when the node becomes ready. |
voices |
integer |
Plays over itself up to this many times (1: a new play restarts it). |
positional |
boolean |
Volume and pan follow the node’s distance and side from the listener (the current camera). |
minDistance |
number |
Positional: full volume within this distance (px). |
maxDistance |
number |
Positional: silent beyond this distance (px). |
SoundNode:connect(event, handler)
Section titled “SoundNode:connect(event, handler)”Connects a handler to one of this node’s events: finished (Playback (or the dialogue) ended); the tree events; custom ones.
self.node:connect("finished", function(value, source) Log.info("finished") end)eventSoundNodeEvent|stringhandlerfun(value:any, source: SoundNode)
Returns integer id Connection id for disconnect
SoundNode:get_property(path)
Section titled “SoundNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("volume")pathSoundNodeProperty|string
Returns any
SoundNode:set_property(path, value, y)
Section titled “SoundNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("volume", 1.5)pathSoundNodeProperty|stringvalueanyy?number
SoundNode:sound_play()
Section titled “SoundNode:sound_play()”Plays the sound effect associated with this SoundNode.
self.node:get_node("JumpSound"):sound_play()SoundNode:sound_stop()
Section titled “SoundNode:sound_stop()”Stops playing the sound effect.
self.node:get_node("EngineSound"):sound_stop()SoundNode:sound_pause()
Section titled “SoundNode:sound_pause()”Pauses the sound effect.
self.node:get_node("EngineSound"):sound_pause()SoundNode:sound_resume()
Section titled “SoundNode:sound_resume()”Resumes the paused sound effect.
self.node:get_node("EngineSound"):sound_resume()MusicNode
Section titled “MusicNode”Inherits Node
Streamed music.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
volume |
number |
Volume (0-1), before the bus and master volumes. |
pitch |
number |
Playback speed / pitch (1 = normal). |
pan |
number |
Stereo position: 0 left, 0.5 centre, 1 right. |
bus |
string |
The mixer bus it plays into (the Mixer tab; empty = Music): its fader, effects and outp… |
caption |
string |
Shown on the subtitle track when it starts, for players with sound captions on (e.g. “[… |
looping |
boolean |
Start again at the end. |
autoplay |
boolean |
Start playing when the node becomes ready. |
isPlaying |
boolean |
Playing now. |
isPaused |
boolean |
Paused now. |
MusicNode:connect(event, handler)
Section titled “MusicNode:connect(event, handler)”Connects a handler to one of this node’s events: finished (Playback (or the dialogue) ended); the tree events; custom ones.
self.node:connect("finished", function(value, source) Log.info("finished") end)eventMusicNodeEvent|stringhandlerfun(value:any, source: MusicNode)
Returns integer id Connection id for disconnect
MusicNode:get_property(path)
Section titled “MusicNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("volume")pathMusicNodeProperty|string
Returns any
MusicNode:set_property(path, value, y)
Section titled “MusicNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("volume", 1.5)pathMusicNodeProperty|stringvalueanyy?number
MusicNode:music_play()
Section titled “MusicNode:music_play()”Plays or resumes the background music on this MusicNode.
Scene.find_node("Music"):music_play()MusicNode:music_stop()
Section titled “MusicNode:music_stop()”Stops background music on this MusicNode.
Scene.find_node("Music"):music_stop()MusicNode:music_pause()
Section titled “MusicNode:music_pause()”Pauses background music on this MusicNode.
Scene.find_node("Music"):music_pause()MusicNode:music_resume()
Section titled “MusicNode:music_resume()”Resumes paused background music on this MusicNode.
Scene.find_node("Music"):music_resume()MusicNode:music_fade(volume, seconds, stop_at_end)
Section titled “MusicNode:music_fade(volume, seconds, stop_at_end)”Fades this MusicNode’s volume to volume (0..1) over seconds, starting
it if it isn’t playing.
Scene.find_node("Music"):music_fade(0, 2.0, true)volumenumbersecondsnumberstop_at_end?booleanStop when the fade reaches 0
StaticBodyNode
Section titled “StaticBodyNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
debugColor |
number[] |
Colour of the collider outline drawn with Show Bounds & Colliders (and the game’s debug… |
oneWay |
boolean |
Jump-through platform: bodies pass from below and land on top. |
StaticBodyNode:connect(event, handler)
Section titled “StaticBodyNode:connect(event, handler)”Connects a handler to one of this node’s events: collision_started (Contact with another body began), collision_ended (Contact with another body ended); the tree events; custom ones.
self.node:connect("collision_started", function(value, source) Log.info("collision_started") end)eventStaticBodyNodeEvent|stringhandlerfun(value:any, source: StaticBodyNode)
Returns integer id Connection id for disconnect
StaticBodyNode:get_property(path)
Section titled “StaticBodyNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("debugColor")pathStaticBodyNodeProperty|string
Returns any
StaticBodyNode:set_property(path, value, y)
Section titled “StaticBodyNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("debugColor", "#ff8800")pathStaticBodyNodeProperty|stringvalueanyy?number
DynamicBodyNode
Section titled “DynamicBodyNode”Inherits Node
A physics body moved by forces and collisions.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
linearVelocity |
Vec2 |
Velocity (px/s). |
angularVelocity |
number |
Spin (degrees/s). |
linearDamping |
number |
Slows movement over time (air drag). |
angularDamping |
number |
Slows spin over time. |
gravityScale |
number |
Multiplies the world’s gravity for this body (0 floats, negative rises). |
sleepThreshold |
number |
Below this speed the body may sleep (px/s). |
enableSleep |
boolean |
Let the body sleep when at rest (saves time; contacts wake it). |
isAwake |
boolean |
Awake (simulated) now. |
fixedRotation |
boolean |
Never rotate (characters, upright crates). |
isBullet |
boolean |
Continuous collision against other moving bodies (fast projectiles). |
allowFastRotation |
boolean |
Allow very fast spin (wheels); can be less stable. |
debugColor |
number[] |
Colour of the collider outline drawn with Show Bounds & Colliders (and the game’s debug… |
DynamicBodyNode:connect(event, handler)
Section titled “DynamicBodyNode:connect(event, handler)”Connects a handler to one of this node’s events: collision_started (Contact with another body began), collision_ended (Contact with another body ended); the tree events; custom ones.
self.node:connect("collision_started", function(value, source) Log.info("collision_started") end)eventDynamicBodyNodeEvent|stringhandlerfun(value:any, source: DynamicBodyNode)
Returns integer id Connection id for disconnect
DynamicBodyNode:get_property(path)
Section titled “DynamicBodyNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("linearVelocity")pathDynamicBodyNodeProperty|string
Returns any
DynamicBodyNode:set_property(path, value, y)
Section titled “DynamicBodyNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("linearVelocity", 100, 50)pathDynamicBodyNodeProperty|stringvalueanyy?number
DynamicBodyNode:apply_force(fx, fy)
Section titled “DynamicBodyNode:apply_force(fx, fy)”Applies a continuous force to this node (requires DynamicBodyNode).
self.node:apply_force(0, -500)fxnumberForce X in NewtonsfynumberForce Y in Newtons
DynamicBodyNode:apply_impulse(ix, iy)
Section titled “DynamicBodyNode:apply_impulse(ix, iy)”Applies an instantaneous impulse to this node (requires DynamicBodyNode).
self.node:apply_impulse(0, -300)ixnumberImpulse XiynumberImpulse Y
DynamicBodyNode:get_linear_velocity()
Section titled “DynamicBodyNode:get_linear_velocity()”Gets the linear velocity of the physics body or character mover in world units per second.
local vx, vy = self.node:get_linear_velocity(); if vy > 400 then self.falling = true endReturns number vx Linear velocity X, number vy Linear velocity Y
DynamicBodyNode:set_linear_velocity(vx, vy)
Section titled “DynamicBodyNode:set_linear_velocity(vx, vy)”Sets the linear velocity of the physics body or character mover directly.
self.node:set_linear_velocity(200, 0)vxnumberLinear velocity XvynumberLinear velocity Y
DynamicBodyNode:get_angular_velocity()
Section titled “DynamicBodyNode:get_angular_velocity()”Gets the angular velocity of the physics body in degrees per second.
local omega = self.node:get_angular_velocity(); if math.abs(omega) > 720 then Log.info("spinning") endReturns number omega Angular velocity in degrees/sec
DynamicBodyNode:set_angular_velocity(omega)
Section titled “DynamicBodyNode:set_angular_velocity(omega)”Sets the angular velocity of the physics body in degrees per second.
self.node:set_angular_velocity(180)omeganumberAngular velocity in degrees/sec
DynamicBodyNode:get_gravity_scale()
Section titled “DynamicBodyNode:get_gravity_scale()”Gets the gravity scale multiplier for this physics body.
local g = self.node:get_gravity_scale(); self.node:set_gravity_scale(g * 0.5)Returns number
DynamicBodyNode:set_gravity_scale(scale)
Section titled “DynamicBodyNode:set_gravity_scale(scale)”Sets the gravity scale multiplier for this physics body.
self.node:set_gravity_scale(0)scalenumber
DynamicBodyNode:is_fixed_rotation()
Section titled “DynamicBodyNode:is_fixed_rotation()”Checks whether rotation is locked on this body.
if not self.node:is_fixed_rotation() then self.node:set_fixed_rotation(true) endReturns boolean
DynamicBodyNode:set_fixed_rotation(fixed)
Section titled “DynamicBodyNode:set_fixed_rotation(fixed)”Locks or unlocks rotation on this physics body.
self.node:set_fixed_rotation(true)fixedboolean
DynamicBodyNode:set_linear_damping(damping)
Section titled “DynamicBodyNode:set_linear_damping(damping)”Sets the linear drag/damping coefficient.
self.node:set_linear_damping(2.0)dampingnumber
DynamicBodyNode:set_angular_damping(damping)
Section titled “DynamicBodyNode:set_angular_damping(damping)”Sets the angular drag/damping coefficient.
self.node:set_angular_damping(1.5)dampingnumber
DynamicBodyNode:is_awake()
Section titled “DynamicBodyNode:is_awake()”Checks if the physics body is awake and participating in simulation.
if not self.node:is_awake() then self.node:set_awake(true) endReturns boolean
DynamicBodyNode:set_awake(awake)
Section titled “DynamicBodyNode:set_awake(awake)”Wakes up or puts the body to sleep.
self.node:set_awake(true)awakeboolean
CharacterMoverNode
Section titled “CharacterMoverNode”Inherits Node
A character controller (move and slide, floors, walls).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
radius |
number |
Capsule radius (px). |
height |
number |
Capsule height (px). |
velocity |
Vec2 |
Velocity now (px/s). |
targetSpeedX |
number |
Horizontal speed the built-in movement accelerates to (px/s). |
maxSpeed |
number |
Top running speed (px/s). |
acceleration |
number |
How quickly it reaches top speed (px/s²). |
jumpSpeed |
number |
Upward speed of a jump (px/s). |
gravityScale |
number |
Multiplies the world’s gravity for the character. |
pushLimit |
number |
Most push per step from overlapping bodies (px/s; 0 = unlimited). |
clipVelocity |
boolean |
Remove velocity into walls and floors it hits (slide along them). |
enableKeyboardInput |
boolean |
Built-in movement: the move / jump input actions drive it. |
isGrounded |
boolean |
Standing on something now. |
debugColor |
number[] |
Colour of the collider outline drawn with Show Bounds & Colliders (and the game’s debug… |
controlMode |
"BuiltIn"|"Script" |
Built-in movement, or Script: the script moves it (character_move_and_slide). |
CharacterMoverNode:connect(event, handler)
Section titled “CharacterMoverNode:connect(event, handler)”Connects a handler to one of this node’s events: collision_started (Contact with another body began), collision_ended (Contact with another body ended); the tree events; custom ones.
self.node:connect("collision_started", function(value, source) Log.info("collision_started") end)eventCharacterMoverNodeEvent|stringhandlerfun(value:any, source: CharacterMoverNode)
Returns integer id Connection id for disconnect
CharacterMoverNode:get_property(path)
Section titled “CharacterMoverNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("radius")pathCharacterMoverNodeProperty|string
Returns any
CharacterMoverNode:set_property(path, value, y)
Section titled “CharacterMoverNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("radius", 1.5)pathCharacterMoverNodeProperty|stringvalueanyy?number
CharacterMoverNode:character_move_and_slide(dt)
Section titled “CharacterMoverNode:character_move_and_slide(dt)”Moves by the velocity (x dt), sliding along whatever it touches; the velocity loses the part going into surfaces. Updates the floor / wall / ceiling state. Switches the node to Script mode.
local collided = self.node:character_move_and_slide(dt)dt?numberDefaults to the frame’s delta time
Returns boolean collided
CharacterMoverNode:character_get_velocity()
Section titled “CharacterMoverNode:character_get_velocity()”Gets the velocity in pixels per second (+y is down).
local vx, vy = self.node:character_get_velocity(); vx = Input.get_axis("left", "right") * 200Returns number vx, number vy
CharacterMoverNode:character_set_velocity(vx, vy)
Section titled “CharacterMoverNode:character_set_velocity(vx, vy)”Sets the velocity in pixels per second (+y is down).
self.node:character_set_velocity(vx, -350)vxnumbervynumber
CharacterMoverNode:character_get_gravity()
Section titled “CharacterMoverNode:character_get_gravity()”Gets the gravity acting on the character: world gravity x its gravity scale.
local gx, gy = self.node:character_get_gravity(); vy = vy + gy * dtReturns number gx, number gy
CharacterMoverNode:character_set_gravity_scale(scale)
Section titled “CharacterMoverNode:character_set_gravity_scale(scale)”Sets the multiplier of the world gravity for this character.
self.node:character_set_gravity_scale(0.5)scalenumber
CharacterMoverNode:character_is_on_floor()
Section titled “CharacterMoverNode:character_is_on_floor()”Was the character standing on a floor after the last move?
if self.node:character_is_on_floor() and Input.is_action_pressed("jump") then vy = -350 endReturns boolean
CharacterMoverNode:character_is_on_wall()
Section titled “CharacterMoverNode:character_is_on_wall()”Was the character touching a wall after the last move?
if self.node:character_is_on_wall() then vy = math.min(vy, 60) endReturns boolean
CharacterMoverNode:character_is_on_ceiling()
Section titled “CharacterMoverNode:character_is_on_ceiling()”Was the character touching a ceiling after the last move?
if self.node:character_is_on_ceiling() then vy = 0 endReturns boolean
CharacterMoverNode:character_get_floor_normal()
Section titled “CharacterMoverNode:character_get_floor_normal()”The floor’s normal (0, -1 on flat ground; tilted on slopes).
local nx, ny = self.node:character_get_floor_normal(); local on_slope = math.abs(nx) > 0.1Returns number nx, number ny
CharacterMoverNode:character_get_wall_normal()
Section titled “CharacterMoverNode:character_get_wall_normal()”The wall’s normal (points away from the wall).
local nx, ny = self.node:character_get_wall_normal(); self.node:character_set_velocity(nx * 250, -300)Returns number nx, number ny
CharacterMoverNode:character_get_last_motion()
Section titled “CharacterMoverNode:character_get_last_motion()”How far the last move actually went.
local dx, dy = self.node:character_get_last_motion(); self.distance = self.distance + math.abs(dx)Returns number dx, number dy
CharacterMoverNode:character_set_control_mode(mode)
Section titled “CharacterMoverNode:character_set_control_mode(mode)”“script”: the script moves it with character_move_and_slide; “builtin”: it moves itself.
self.node:character_set_control_mode("builtin")mode"script"|"builtin"
CharacterMoverNode:character_move(dirX, jump)
Section titled “CharacterMoverNode:character_move(dirX, jump)”BuiltIn mode: steers the character horizontally and jumps if grounded.
self.node:character_move(Input.get_axis("left", "right"), Input.is_action_pressed("jump"))dirXnumberHorizontal direction (-1.0 to 1.0), times the node’s max speedjump?booleanWhether to jump if grounded
CharacterMoverNode:character_is_grounded()
Section titled “CharacterMoverNode:character_is_grounded()”Same as character_is_on_floor().
if self.node:character_is_grounded() then self.coyote = 0.1 endReturns boolean
CharacterMoverNode:character_set_speed(speed)
Section titled “CharacterMoverNode:character_set_speed(speed)”BuiltIn mode: sets the maximum horizontal run speed.
self.node:character_set_speed(220)speednumber
CharacterMoverNode:character_set_jump_speed(speed)
Section titled “CharacterMoverNode:character_set_jump_speed(speed)”BuiltIn mode: sets the jump speed.
self.node:character_set_jump_speed(400)speednumber
AreaNode
Section titled “AreaNode”Inherits Node
A sensor: reports bodies that overlap it.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
overlapCount |
integer |
Bodies overlapping now. |
hasOverlaps |
boolean |
Anything overlapping now. |
debugColor |
number[] |
Outline colour when nothing overlaps. |
activeColor |
number[] |
Outline colour while something overlaps. |
AreaNode:connect(event, handler)
Section titled “AreaNode:connect(event, handler)”Connects a handler to one of this node’s events: body_entered (A body entered the area), body_exited (A body left the area); the tree events; custom ones.
self.node:connect("body_entered", function(value, source) Log.info("body_entered") end)eventAreaNodeEvent|stringhandlerfun(value:any, source: AreaNode)
Returns integer id Connection id for disconnect
AreaNode:get_property(path)
Section titled “AreaNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("debugColor")pathAreaNodeProperty|string
Returns any
AreaNode:set_property(path, value, y)
Section titled “AreaNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("debugColor", "#ff8800")pathAreaNodeProperty|stringvalueanyy?number
AreaNode:area_is_overlapping()
Section titled “AreaNode:area_is_overlapping()”Checks whether any physics nodes are currently inside this sensor area.
if self.node:get_node("Hitbox"):area_is_overlapping() then self:take_damage(1) endReturns boolean
AreaNode:area_get_overlap_count()
Section titled “AreaNode:area_get_overlap_count()”Returns the number of bodies currently overlapping this sensor area.
local count = self.node:get_node("Zone"):area_get_overlap_count()Returns number
AreaNode:area_get_overlapping_nodes()
Section titled “AreaNode:area_get_overlapping_nodes()”Returns an array of all nodes currently overlapping this sensor area.
for _, n in ipairs(self.node:area_get_overlapping_nodes()) do Log.info(n:get_name()) endReturns Node[]
RaycastNode
Section titled “RaycastNode”Inherits Node
A ray that reports what it hits.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
direction |
Vec2 |
Direction of the ray (rotated with the node). |
length |
number |
Length of the ray (px). |
collideWithSensors |
boolean |
Sensor shapes (areas) also stop the ray. |
isColliding |
boolean |
The ray hit something this frame. |
hitFraction |
number |
Where along the ray it hit (0 start, 1 end). |
hitPoint |
Vec2 |
World point of the hit (px). |
hitNormal |
Vec2 |
Surface direction at the hit. |
rayColor |
number[] |
Ray colour when it hits nothing. |
hitColor |
number[] |
Ray colour when it hits. |
RaycastNode:connect(event, handler)
Section titled “RaycastNode:connect(event, handler)”Connects a handler to one of this node’s events: hit_started (The ray started hitting a node), hit_ended (The ray stopped hitting a node); the tree events; custom ones.
self.node:connect("hit_started", function(value, source) Log.info("hit_started") end)eventRaycastNodeEvent|stringhandlerfun(value:any, source: RaycastNode)
Returns integer id Connection id for disconnect
RaycastNode:get_property(path)
Section titled “RaycastNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("direction")pathRaycastNodeProperty|string
Returns any
RaycastNode:set_property(path, value, y)
Section titled “RaycastNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("direction", 100, 50)pathRaycastNodeProperty|stringvalueanyy?number
RaycastNode:raycast_cast()
Section titled “RaycastNode:raycast_cast()”Executes the raycast immediately against the physics world.
local ray = self.node:get_node("Ray"); ray:raycast_cast()RaycastNode:raycast_is_colliding()
Section titled “RaycastNode:raycast_is_colliding()”Checks whether the raycast is currently intersecting a physics obstacle.
local ray = self.node:get_node("Ray"); ray:raycast_cast(); local grounded = ray:raycast_is_colliding()Returns boolean
RaycastNode:raycast_get_hit_point()
Section titled “RaycastNode:raycast_get_hit_point()”Gets the world-space intersection point of the raycast hit.
local ray = self.node:get_node("Ray"); local x, y = ray:raycast_get_hit_point()Returns number x, number y
RaycastNode:raycast_get_hit_normal()
Section titled “RaycastNode:raycast_get_hit_normal()”Gets the world-space surface normal at the raycast intersection.
local ray = self.node:get_node("Ray"); local nx, ny = ray:raycast_get_hit_normal()Returns number nx, number ny
RaycastNode:raycast_get_hit_fraction()
Section titled “RaycastNode:raycast_get_hit_fraction()”Gets the fraction from 0.0 to 1.0 along the ray length where the hit occurred.
local ray = self.node:get_node("Ray"); local dist = ray:raycast_get_hit_fraction() * 64Returns number fraction
RaycastNode:raycast_get_hit_node()
Section titled “RaycastNode:raycast_get_hit_node()”Gets the Node struck by the raycast, or nil if none.
local ray = self.node:get_node("Ray"); local hit = ray:raycast_get_hit_node(); if hit then Log.info(hit.name) endReturns Node?
RaycastNode:raycast_set_direction(dx, dy)
Section titled “RaycastNode:raycast_set_direction(dx, dy)”Sets the local direction vector for the raycast node.
local ray = self.node:get_node("Ray"); ray:raycast_set_direction(1, 0)dxnumberdynumber
RaycastNode:raycast_set_length(length)
Section titled “RaycastNode:raycast_set_length(length)”Sets the maximum reach length in pixels for the raycast node.
local ray = self.node:get_node("Ray"); ray:raycast_set_length(128)lengthnumber
LdtkLevelNode
Section titled “LdtkLevelNode”Inherits Node, NavGrid
An LDtk level (layers, entities, IntGrid).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
enablePhysics |
boolean |
Build colliders from IntGrid cells whose collision rule is Solid / One Way. |
spawnEntities |
boolean |
Spawn the level’s entities (mapped to components) when ready. |
parallax |
boolean |
Apply the LDtk layers’ parallax factors. |
drawBackground |
boolean |
Draw the level’s background colour / image. |
drawEntityTiles |
boolean |
Draw entities’ LDtk tiles (editor visuals for unspawned entities). |
tintColor |
number[] |
Multiplies every layer’s colours. |
drawDebugColliders |
boolean |
Outline the generated colliders. |
drawDebugEntities |
boolean |
Outline entity bounds with their names. |
LdtkLevelNode:connect(event, handler)
Section titled “LdtkLevelNode:connect(event, handler)”Connects a handler to one of this node’s events: level_loaded (The LDtk level was built), entity_spawned (An LDtk entity was spawned); the tree events; custom ones.
self.node:connect("level_loaded", function(value, source) Log.info("level_loaded") end)eventLdtkLevelNodeEvent|stringhandlerfun(value:any, source: LdtkLevelNode)
Returns integer id Connection id for disconnect
LdtkLevelNode:get_property(path)
Section titled “LdtkLevelNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("enablePhysics")pathLdtkLevelNodeProperty|string
Returns any
LdtkLevelNode:set_property(path, value, y)
Section titled “LdtkLevelNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("enablePhysics", true)pathLdtkLevelNodeProperty|stringvalueanyy?number
LdtkLevelNode:ldtk_get_level_identifier()
Section titled “LdtkLevelNode:ldtk_get_level_identifier()”Gets the current level identifier.
local lv = Scene.find_node("Level"); Log.info("In " .. lv:ldtk_get_level_identifier())Returns string
LdtkLevelNode:ldtk_get_levels(world)
Section titled “LdtkLevelNode:ldtk_get_levels(world)”Lists level identifiers (every level, or one world’s).
local lv = Scene.find_node("Level"); for _, id in ipairs(lv:ldtk_get_levels()) do Log.info(id) endworld?string
Returns string[]
LdtkLevelNode:ldtk_load_level(identifier)
Section titled “LdtkLevelNode:ldtk_load_level(identifier)”Switches to another level (identifier or iid); colliders and entities are rebuilt.
local lv = Scene.find_node("Level"); local ok = lv:ldtk_load_level("Level_2")identifierLdtkLevel|string
Returns boolean ok
LdtkLevelNode:ldtk_get_level(level)
Section titled “LdtkLevelNode:ldtk_get_level(level)”Gets a level’s details (the current level by default).
local lv = Scene.find_node("Level"); local info = lv:ldtk_get_level(); Log.info(info.width)level?LdtkLevel|string
Returns LdtkLevel?
LdtkLevelNode:ldtk_get_level_size()
Section titled “LdtkLevelNode:ldtk_get_level_size()”Gets the current level size in pixels.
local lv = Scene.find_node("Level"); local w, h = lv:ldtk_get_level_size(); Log.info(w, h)Returns number width, number height
LdtkLevelNode:ldtk_get_level_field(name, level)
Section titled “LdtkLevelNode:ldtk_get_level_field(name, level)”Gets a level field value (nil if absent or null).
local lv = Scene.find_node("Level"); local music = lv:ldtk_get_level_field("music")namestringlevel?LdtkLevel|stringAnother level (default: the current one)
Returns any
LdtkLevelNode:ldtk_get_level_fields(level)
Section titled “LdtkLevelNode:ldtk_get_level_fields(level)”Gets every field of a level.
local lv = Scene.find_node("Level"); local fields = lv:ldtk_get_level_fields(); Log.info(fields.music)level?LdtkLevel|string
Returns table<string, any>
LdtkLevelNode:ldtk_get_neighbours(level)
Section titled “LdtkLevelNode:ldtk_get_neighbours(level)”Lists a level’s neighbours.
local lv = Scene.find_node("Level"); for _, n in ipairs(lv:ldtk_get_neighbours()) do Log.info(n.dir) endlevel?LdtkLevel|string
Returns LdtkNeighbour[]
LdtkLevelNode:ldtk_level_at(x, y)
Section titled “LdtkLevelNode:ldtk_level_at(x, y)”The level at a world position (world mode: any loaded level; otherwise looked up in the world layout).
local lv = Scene.find_node("Level"); local id = lv:ldtk_level_at(self.node:get_position())xnumberynumber
Returns string?
LdtkLevelNode:ldtk_get_worlds()
Section titled “LdtkLevelNode:ldtk_get_worlds()”Lists the project’s worlds.
local lv = Scene.find_node("Level"); for _, w in ipairs(lv:ldtk_get_worlds()) do Log.info(w.identifier) endReturns LdtkWorld[]
LdtkLevelNode:ldtk_get_world()
Section titled “LdtkLevelNode:ldtk_get_world()”Gets the current world identifier.
local lv = Scene.find_node("Level"); local world = lv:ldtk_get_world()Returns string
LdtkLevelNode:ldtk_set_world(world, level)
Section titled “LdtkLevelNode:ldtk_set_world(world, level)”Switches world (its first level, or level).
local lv = Scene.find_node("Level"); local ok = lv:ldtk_set_world("Dungeon", "Dungeon_Entrance")worldstringlevel?LdtkLevel|string
Returns boolean ok
LdtkLevelNode:ldtk_set_world_mode(on)
Section titled “LdtkLevelNode:ldtk_set_world_mode(on)”World mode: every level of the world at its world position (rebuilds).
local lv = Scene.find_node("Level"); lv:ldtk_set_world_mode(true)onboolean
LdtkLevelNode:ldtk_is_world_mode()
Section titled “LdtkLevelNode:ldtk_is_world_mode()”Returns true when world mode is on (every level of the world loaded at its world position).
local lv = Scene.find_node("Level"); if not lv:ldtk_is_world_mode() then lv:ldtk_set_world_mode(true) endReturns boolean
LdtkLevelNode:ldtk_get_layers(level)
Section titled “LdtkLevelNode:ldtk_get_layers(level)”Lists a level’s layers (top first).
local lv = Scene.find_node("Level"); for _, layer in ipairs(lv:ldtk_get_layers()) do Log.info(layer.type) endlevel?LdtkLevel|string
Returns LdtkLayer[]
LdtkLevelNode:ldtk_set_layer_visible(name, visible)
Section titled “LdtkLevelNode:ldtk_set_layer_visible(name, visible)”Shows or hides a layer (in every loaded level).
local lv = Scene.find_node("Level"); lv:ldtk_set_layer_visible("Background", false)nameLdtkLayer|stringvisibleboolean
LdtkLevelNode:ldtk_is_layer_visible(name)
Section titled “LdtkLevelNode:ldtk_is_layer_visible(name)”Returns whether a layer is currently shown.
local lv = Scene.find_node("Level"); lv:ldtk_set_layer_visible("Fog", not lv:ldtk_is_layer_visible("Fog"))nameLdtkLayer|string
Returns boolean
LdtkLevelNode:ldtk_get_int_grid(layer, x, y)
Section titled “LdtkLevelNode:ldtk_get_int_grid(layer, x, y)”Gets the IntGrid value at a world position (0 = empty).
local lv = Scene.find_node("Level"); local v = lv:ldtk_get_int_grid("Collisions", self.node:get_position())layerLdtkLayer|stringIntGrid layer identifier, e.g. “Collisions”xnumberWorld XynumberWorld Y
Returns integer
LdtkLevelNode:ldtk_get_int_grid_name(layer, x, y)
Section titled “LdtkLevelNode:ldtk_get_int_grid_name(layer, x, y)”Gets the identifier of the IntGrid value at a world position (“” if none / unnamed).
local lv = Scene.find_node("Level"); local name = lv:ldtk_get_int_grid_name("Collisions", self.node:get_position())layerLdtkLayer|stringxnumberynumber
Returns string
LdtkLevelNode:ldtk_get_int_grid_cell(layer, cx, cy, level)
Section titled “LdtkLevelNode:ldtk_get_int_grid_cell(layer, cx, cy, level)”Gets the IntGrid value of a cell.
local lv = Scene.find_node("Level"); local v = lv:ldtk_get_int_grid_cell("Collisions", 4, 7)layerLdtkLayer|stringcxintegercyintegerlevel?LdtkLevel|string
Returns integer
LdtkLevelNode:ldtk_get_int_grid_values(layer)
Section titled “LdtkLevelNode:ldtk_get_int_grid_values(layer)”Lists an IntGrid layer’s values (name, colour, collision).
local lv = Scene.find_node("Level"); local values = lv:ldtk_get_int_grid_values("Collisions")layerLdtkLayer|string
Returns LdtkIntGridValue[]
LdtkLevelNode:ldtk_world_to_cell(layer, x, y)
Section titled “LdtkLevelNode:ldtk_world_to_cell(layer, x, y)”World position -> layer cell.
local lv = Scene.find_node("Level"); local cx, cy = lv:ldtk_world_to_cell("Collisions", self.node:get_position())layerLdtkLayer|stringxnumberynumber
Returns integer cx, integer cy
LdtkLevelNode:ldtk_cell_to_world(layer, cx, cy, level)
Section titled “LdtkLevelNode:ldtk_cell_to_world(layer, cx, cy, level)”Layer cell -> world position of its centre.
local lv = Scene.find_node("Level"); self.node:set_position(lv:ldtk_cell_to_world("Collisions", 4, 7))layerLdtkLayer|stringcxintegercyintegerlevel?LdtkLevel|string
Returns number x, number y
LdtkLevelNode:ldtk_get_collision(x, y)
Section titled “LdtkLevelNode:ldtk_get_collision(x, y)”Collision at a world position: “solid”, “one_way”, “trigger” or “none”, plus the layer and value name.
local lv = Scene.find_node("Level"); local kind, layer, value = lv:ldtk_get_collision(self.node:get_position())xnumberynumber
Returns string type, string? layer, string|integer|nil value
LdtkLevelNode:ldtk_get_triggers()
Section titled “LdtkLevelNode:ldtk_get_triggers()”The trigger areas built from IntGrid values set to Trigger (“
local lv = Scene.find_node("Level"); local spikes = lv:ldtk_get_triggers()["Collisions_spikes"]Returns table<string, Node>
LdtkLevelNode:ldtk_get_tile(layer, x, y)
Section titled “LdtkLevelNode:ldtk_get_tile(layer, x, y)”Gets the tile of a Tiles/AutoLayer layer at a world position.
local lv = Scene.find_node("Level"); local tile = lv:ldtk_get_tile("Ground", self.node:get_position())layerLdtkLayer|stringxnumberynumber
Returns LdtkTile?
LdtkLevelNode:ldtk_get_tile_enums(layer, x, y)
Section titled “LdtkLevelNode:ldtk_get_tile_enums(layer, x, y)”Gets the enum values tagging the tile at a world position (tileset enum tags).
local lv = Scene.find_node("Level"); local tags = lv:ldtk_get_tile_enums("Ground", self.node:get_position())layerLdtkLayer|stringxnumberynumber
Returns string[]
LdtkLevelNode:ldtk_get_enum(name)
Section titled “LdtkLevelNode:ldtk_get_enum(name)”Gets an enum’s values (colour, tile, index).
local lv = Scene.find_node("Level"); for _, v in ipairs(lv:ldtk_get_enum("ItemType") or {}) do Log.info(v.id) endnameLdtkEnumName
Returns LdtkEnumValue[]?
LdtkLevelNode:ldtk_get_enums()
Section titled “LdtkLevelNode:ldtk_get_enums()”Every enum: name -> value ids.
local lv = Scene.find_node("Level"); local item_types = lv:ldtk_get_enums()["ItemType"]Returns table<string, string[]>
LdtkLevelNode:ldtk_get_entities(identifier)
Section titled “LdtkLevelNode:ldtk_get_entities(identifier)”Lists the loaded levels’ entities, optionally only those with an identifier.
local lv = Scene.find_node("Level"); for _, e in ipairs(lv:ldtk_get_entities("Enemy")) do Log.info(e.iid) endidentifier?LdtkEntity
Returns LdtkEntity[]
LdtkLevelNode:ldtk_get_entities_by_tag(tag)
Section titled “LdtkLevelNode:ldtk_get_entities_by_tag(tag)”Lists the loaded levels’ entities with a tag.
local lv = Scene.find_node("Level"); local pickups = lv:ldtk_get_entities_by_tag("pickup")tagstring
Returns LdtkEntity[]
LdtkLevelNode:ldtk_get_entity(iid)
Section titled “LdtkLevelNode:ldtk_get_entity(iid)”Gets an entity anywhere in the project by iid.
local lv = Scene.find_node("Level"); local e = lv:ldtk_get_entity(self.target_iid)iidstring
Returns LdtkEntity?
LdtkLevelNode:ldtk_get_entity_node(iid)
Section titled “LdtkLevelNode:ldtk_get_entity_node(iid)”Gets the node spawned for an entity (by iid).
local lv = Scene.find_node("Level"); local door = lv:ldtk_get_entity_node(self.door_iid)iidstring
Returns Node?
LdtkLevelNode:ldtk_get_entity_defs()
Section titled “LdtkLevelNode:ldtk_get_entity_defs()”Lists the project’s entity definitions.
local lv = Scene.find_node("Level"); local defs = lv:ldtk_get_entity_defs(); Log.info(defs[1].identifier)Returns LdtkEntityDef[]
LdtkLevelNode:ldtk_get_links()
Section titled “LdtkLevelNode:ldtk_get_links()”Lists the resolved EntityRef links between spawned entities.
local lv = Scene.find_node("Level"); for _, link in ipairs(lv:ldtk_get_links()) do Log.info(link.field) endReturns LdtkLink[]
LdtkLevelNode:ldtk_entity()
Section titled “LdtkLevelNode:ldtk_entity()”The LDtk entity this node was spawned from (nil otherwise).
local e = self.node:ldtk_entity(); if e then Log.info(e.identifier) endReturns LdtkEntity?
LdtkLevelNode:ldtk_level_node()
Section titled “LdtkLevelNode:ldtk_level_node()”The LdtkLevelNode that spawned this node.
local level = self.node:ldtk_level_node()Returns Node?
LdtkLevelNode:ldtk_field(name)
Section titled “LdtkLevelNode:ldtk_field(name)”A field of this node’s entity.
self.health = self.node:ldtk_field("health") or 3namestring
Returns any
LdtkLevelNode:ldtk_ref(field)
Section titled “LdtkLevelNode:ldtk_ref(field)”The node an EntityRef field points to (the first one for arrays).
local door = self.node:ldtk_ref("target_door"); if door then door:set_visible(false) endfieldstring
Returns Node?
LdtkLevelNode:ldtk_refs(field)
Section titled “LdtkLevelNode:ldtk_refs(field)”Nodes referenced by a field, or every reference ({field, iid, node}) without one.
for _, n in ipairs(self.node:ldtk_refs("lights")) do n:set_visible(true) endfield?string
Returns Node[]|{field: string, iid: string, node: Node?}[]
LdtkLevelNode:ldtk_referenced_by(field)
Section titled “LdtkLevelNode:ldtk_referenced_by(field)”Entities whose EntityRef fields point at this one.
for _, r in ipairs(self.node:ldtk_referenced_by("target")) do Log.info(r.field) endfield?string
Returns {node: Node, field: string}[]
TileMapNode
Section titled “TileMapNode”Inherits Node, NavGrid
A painted tile map.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
solid |
boolean |
Build static colliders for the painted tiles. |
tint |
number[] |
Multiplies the texture’s colours (white = unchanged; alpha fades it). |
asepriteLayer |
string |
With an Aseprite file as the tileset: the tilemap layer the map comes from (its tiles, … |
TileMapNode:get_property(path)
Section titled “TileMapNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("solid")pathTileMapNodeProperty|string
Returns any
TileMapNode:set_property(path, value, y)
Section titled “TileMapNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("solid", true)pathTileMapNodeProperty|stringvalueanyy?number
LightNode
Section titled “LightNode”Inherits Node
A 2D point or spot light.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
kind |
"Point"|"Spot" |
Point: shines all round. Spot: a cone along the node’s rotation. |
color |
number[] |
Colour of the light. |
energy |
number |
Brightness multiplier. |
radius |
number |
Reach of the light (px). |
falloff |
number |
Fade towards the edge: 1 linear, 2 smooth, higher = tighter. |
spread |
number |
Spot: half-angle of the cone (degrees). |
shadows |
boolean |
Cast shadows from the scene’s physics shapes (bodies, LDtk and tile map colliders; not … |
LightNode:get_property(path)
Section titled “LightNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("kind")pathLightNodeProperty|string
Returns any
LightNode:set_property(path, value, y)
Section titled “LightNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("kind", "Spot")pathLightNodeProperty|stringvalueanyy?number
LightNode:light_set_color(r, g, b)
Section titled “LightNode:light_set_color(r, g, b)”Sets the light’s colour (0..1).
local lamp = self.node:get_node("Lamp"); lamp:light_set_color(1.0, 0.8, 0.4)rnumbergnumberbnumber
LightNode:light_set_energy(energy)
Section titled “LightNode:light_set_energy(energy)”Sets the light’s energy (brightness multiplier, 0..8).
local lamp = self.node:get_node("Lamp"); lamp:light_set_energy(2.5)energynumber
LightNode:light_get_energy()
Section titled “LightNode:light_get_energy()”Gets the light’s energy (brightness multiplier).
local lamp = self.node:get_node("Lamp"); lamp:light_set_energy(lamp:light_get_energy() * 0.9)Returns number energy
LightNode:light_set_radius(radius)
Section titled “LightNode:light_set_radius(radius)”Sets the light’s radius (world units).
local lamp = self.node:get_node("Lamp"); lamp:light_set_radius(200)radiusnumber
JointNode
Section titled “JointNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
debugColor |
number[] |
Colour of the line drawn between the anchors. |
JointNode:get_property(path)
Section titled “JointNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("debugColor")pathJointNodeProperty|string
Returns any
JointNode:set_property(path, value, y)
Section titled “JointNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("debugColor", "#ff8800")pathJointNodeProperty|stringvalueanyy?number
TextNode
Section titled “TextNode”Inherits Node, TextHolder
Text in the world (fonts, rich text, typewriter).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
text |
string |
The text; rich text markup when Rich Text is on, a locale key when Localized. |
font |
string |
Project font (.ttf / .otf / .fnt; “” = the engine font). |
fontSize |
number |
Text size (px). |
color |
number[] |
Text colour (rich text [color] overrides it). |
align |
"Left"|"Center"|"Right" |
Alignment of the lines within the text block. |
maxWidth |
number |
Wrap lines at this width (px); 0 = only at line breaks. |
lineSpacing |
number |
Line height as a multiple of the font size. |
richText |
boolean |
Interpret [color=..] [size=..] [wave] [shake] tags. |
localized |
boolean |
The text is a key in the locale tables; shows the current language’s translation. |
sdf |
boolean |
Signed-distance-field rendering: stays sharp when scaled or zoomed (vector fonts). |
revealSpeed |
number |
Typewriter: characters per second (0 = all at once); emits “revealed” when done. |
TextNode:connect(event, handler)
Section titled “TextNode:connect(event, handler)”Connects a handler to one of this node’s events: revealed (The text finished revealing); the tree events; custom ones.
self.node:connect("revealed", function(value, source) Log.info("revealed") end)eventTextNodeEvent|stringhandlerfun(value:any, source: TextNode)
Returns integer id Connection id for disconnect
TextNode:get_property(path)
Section titled “TextNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("text")pathTextNodeProperty|string
Returns any
TextNode:set_property(path, value, y)
Section titled “TextNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("text", "text")pathTextNodeProperty|stringvalueanyy?number
TextNode:text_restart()
Section titled “TextNode:text_restart()”TextNode: types the text out again (revealSpeed > 0).
self.node:get_node("Intro"):text_restart()DialogueNode
Section titled “DialogueNode”Inherits Node
A dialogue box that types out lines.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
font |
string |
Project font (“” = the engine font). |
fontSize |
number |
Text size (px). |
textColor |
number[] |
Colour of the line’s text. |
speakerColor |
number[] |
Colour of the speaker’s name. |
panelColor |
number[] |
Fill colour of the box. |
borderColor |
number[] |
Colour of the box’s border. |
padding |
number |
Space between the border and the text (px). |
revealSpeed |
number |
Typewriter speed in characters per second (0 = whole lines). |
advanceAction |
string |
Input action that shows the rest of the line, then the next (“confirm”). |
localized |
boolean |
Lines are keys in the locale tables (locale/*.csv). |
mode |
"Box"|"Subtitles" |
Box: a dialogue box the player advances. Subtitles: the lines go on the subtitle track … |
DialogueNode:connect(event, handler)
Section titled “DialogueNode:connect(event, handler)”Connects a handler to one of this node’s events: line_shown (A dialogue line was fully shown (1-based)), finished (Playback (or the dialogue) ended); the tree events; custom ones.
self.node:connect("line_shown", function(value, source) Log.info("line_shown") end)eventDialogueNodeEvent|stringhandlerfun(value:any, source: DialogueNode)
Returns integer id Connection id for disconnect
DialogueNode:get_property(path)
Section titled “DialogueNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathDialogueNodeProperty|string
Returns any
DialogueNode:set_property(path, value, y)
Section titled “DialogueNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathDialogueNodeProperty|stringvalueanyy?number
DialogueNode:dialogue_show(lines, speaker)
Section titled “DialogueNode:dialogue_show(lines, speaker)”DialogueNode: opens the box with these lines (strings or {speaker, text}), or one line: box:dialogue_show(text, speaker). Each line types out; the advance action (default “confirm”) shows the rest, then the next line. Events: “line_shown”(index), “finished”.
local box = Scene.find_node("Dialogue"); box:dialogue_show({ { speaker = "Guard", text = "Halt!" } })linesstring|(string|DialogueLine)[]speaker?string
DialogueNode:dialogue_next()
Section titled “DialogueNode:dialogue_next()”Shows the rest of the line, else the next one.
Scene.find_node("Dialogue"):dialogue_next()DialogueNode:dialogue_close()
Section titled “DialogueNode:dialogue_close()”Closes the dialogue box.
Scene.find_node("Dialogue"):dialogue_close()DialogueNode:dialogue_is_open()
Section titled “DialogueNode:dialogue_is_open()”Checks whether the dialogue box is currently open.
if Scene.find_node("Dialogue"):dialogue_is_open() then return endReturns boolean
NineSliceNode
Section titled “NineSliceNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
texturePath |
string |
Texture to slice. |
size |
Vec2 |
Drawn size (px); the borders keep their size, the middle stretches. |
marginsLT |
Vec2 |
Left and top border widths (texture px). |
marginsRB |
Vec2 |
Right and bottom border widths (texture px). |
tint |
number[] |
Multiplies the texture’s colours (white = unchanged; alpha fades it). |
NineSliceNode:get_property(path)
Section titled “NineSliceNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("texturePath")pathNineSliceNodeProperty|string
Returns any
NineSliceNode:set_property(path, value, y)
Section titled “NineSliceNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("texturePath", "text")pathNineSliceNodeProperty|stringvalueanyy?number
ParallaxNode
Section titled “ParallaxNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
texturePath |
string |
Background texture. |
factor |
Vec2 |
Movement relative to the camera: 1 moves with the world, 0 stays fixed on screen. |
repeatX |
boolean |
Tile horizontally to fill the view. |
repeatY |
boolean |
Tile vertically to fill the view. |
scrollSpeed |
Vec2 |
Drifts by itself (px/s; clouds). |
tint |
number[] |
Multiplies the texture’s colours (white = unchanged; alpha fades it). |
ParallaxNode:get_property(path)
Section titled “ParallaxNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("texturePath")pathParallaxNodeProperty|string
Returns any
ParallaxNode:set_property(path, value, y)
Section titled “ParallaxNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("texturePath", "text")pathParallaxNodeProperty|stringvalueanyy?number
LineNode
Section titled “LineNode”Inherits Node
A polyline.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
width |
number |
Line thickness (px). |
color |
number[] |
Line colour. |
closed |
boolean |
Join the last point to the first. |
rounded |
boolean |
Round joints and caps. |
LineNode:get_property(path)
Section titled “LineNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("width")pathLineNodeProperty|string
Returns any
LineNode:set_property(path, value, y)
Section titled “LineNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("width", 1.5)pathLineNodeProperty|stringvalueanyy?number
LineNode:line_set_points(points)
Section titled “LineNode:line_set_points(points)”LineNode: replaces its points (local to the node).
self.node:get_node("Laser"):line_set_points({ {0, 0}, {120, 0} })pointsnumber[][]{ {x, y}, … }
LineNode:line_add_point(x, y)
Section titled “LineNode:line_add_point(x, y)”LineNode: appends a point (local to the node).
self.node:get_node("Path"):line_add_point(64, 32)xnumberynumber
LineNode:line_clear()
Section titled “LineNode:line_clear()”LineNode: removes every point.
self.node:get_node("Path"):line_clear()TrailNode
Section titled “TrailNode”Inherits Node
A fading ribbon behind a moving node.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
lifetime |
number |
Seconds a point of the trail lasts. |
width |
number |
Width at the head (it tapers to the tail; px). |
color |
number[] |
Colour at the head. |
endColor |
number[] |
Colour at the tail (fades to it). |
minDistance |
number |
Distance the parent must move before a new point is recorded (px). |
emitting |
boolean |
Record new points (off: the trail fades away). |
TrailNode:get_property(path)
Section titled “TrailNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("lifetime")pathTrailNodeProperty|string
Returns any
TrailNode:set_property(path, value, y)
Section titled “TrailNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("lifetime", 1.5)pathTrailNodeProperty|stringvalueanyy?number
TrailNode:trail_clear()
Section titled “TrailNode:trail_clear()”TrailNode: drops the recorded ribbon (e.g. after a teleport).
self.node:set_position(0, 0); self.node:get_node("Trail"):trail_clear()VisibilityNotifierNode
Section titled “VisibilityNotifierNode”Inherits Node
Knows when the camera sees a rectangle: “screen_entered” / “screen_exited”; can pause, disable or remove its parent off screen.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
The rectangle (centred on the node, scaled with it) the camera has to see. |
margin |
number |
Grows the camera’s view by this many pixels: fires a little before it really shows. |
action |
"None"|"Pause_Parent"|"Disable_Parent"|"Remove_Parent" |
What happens to the parent off screen: Pause (stops updating, resumes when seen), Disab… |
onScreen |
boolean |
The camera sees it now (runtime, read-only). |
VisibilityNotifierNode:connect(event, handler)
Section titled “VisibilityNotifierNode:connect(event, handler)”Connects a handler to one of this node’s events: screen_entered (The camera started seeing it), screen_exited (The camera stopped seeing it); the tree events; custom ones.
self.node:connect("screen_entered", function(value, source) Log.info("screen_entered") end)eventVisibilityNotifierNodeEvent|stringhandlerfun(value:any, source: VisibilityNotifierNode)
Returns integer id Connection id for disconnect
VisibilityNotifierNode:get_property(path)
Section titled “VisibilityNotifierNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathVisibilityNotifierNodeProperty|string
Returns any
VisibilityNotifierNode:set_property(path, value, y)
Section titled “VisibilityNotifierNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathVisibilityNotifierNodeProperty|stringvalueanyy?number
NavigationRegionNode
Section titled “NavigationRegionNode”Inherits Node, NavGrid
A grid area agents find paths in: baked from static bodies, solid tile maps and LDtk Solid cells; scripts can block cells (doors).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
The area agents find paths in, from the node’s position (px). |
cellSize |
number |
Size of a grid cell (px): smaller follows walls more closely, larger finds paths faster. |
usePhysics |
boolean |
Static bodies’ collision shapes inside the area block. |
useTileMaps |
boolean |
Solid tile maps’ painted tiles block. |
useLdtk |
boolean |
LDtk IntGrid cells with a Solid collision rule block. |
NavigationRegionNode:get_property(path)
Section titled “NavigationRegionNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathNavigationRegionNodeProperty|string
Returns any
NavigationRegionNode:set_property(path, value, y)
Section titled “NavigationRegionNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathNavigationRegionNodeProperty|stringvalueanyy?number
NavigationRegionNode:nav_rebake()
Section titled “NavigationRegionNode:nav_rebake()”Rebuilds the region’s cells from the scene (after moving walls, loading a level, painting tiles).
Scene.find_node("NavigationRegion"):nav_rebake()NavigationRegionNode:nav_set_blocked(x, y, w, h, blocked)
Section titled “NavigationRegionNode:nav_set_blocked(x, y, w, h, blocked)”Blocks (or opens) a world rectangle for paths - doors, bridges, placed towers. Kept across rebakes.
region:nav_set_blocked(door.position.x - 16, door.position.y - 32, 32, 64, not self.open)xnumberynumberwnumberhnumberblocked?booleanDefault true
NavigationAgentNode
Section titled “NavigationAgentNode”Inherits Node
Follows a path to a target and moves its parent: speed, radius (keeps clear of walls and other agents), avoidance; “navigation_finished” / “target_unreachable”.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
speed |
number |
How fast it moves along its path (px/s). |
radius |
number |
Its size: paths keep this far from walls, and agents keep this far apart. |
arriveDistance |
number |
How close to the target counts as arrived (px). |
repathInterval |
number |
Seconds between new paths while moving (a moving target, opened doors); 0 = only when t… |
navMap |
string |
The NavigationRegion, TileMap or LDtk level to find paths in (a node path); empty = the… |
moveParent |
boolean |
Move the parent along the path (a CharacterMover, a DynamicBody or any node); off: read… |
avoidance |
boolean |
Steer away from other agents (their radius). |
velocity |
Vec2 |
The velocity it wants this frame (px/s; read-only). |
NavigationAgentNode:connect(event, handler)
Section titled “NavigationAgentNode:connect(event, handler)”Connects a handler to one of this node’s events: navigation_finished (The agent arrived at its target), target_unreachable (No way to the agent’s target); the tree events; custom ones.
self.node:connect("navigation_finished", function(value, source) Log.info("navigation_finished") end)eventNavigationAgentNodeEvent|stringhandlerfun(value:any, source: NavigationAgentNode)
Returns integer id Connection id for disconnect
NavigationAgentNode:get_property(path)
Section titled “NavigationAgentNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("speed")pathNavigationAgentNodeProperty|string
Returns any
NavigationAgentNode:set_property(path, value, y)
Section titled “NavigationAgentNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("speed", 1.5)pathNavigationAgentNodeProperty|stringvalueanyy?number
NavigationAgentNode:nav_set_target(x, y)
Section titled “NavigationAgentNode:nav_set_target(x, y)”Sends the agent (and the node it moves) to a world position along a path.
self.node:get_node("NavigationAgent"):nav_set_target(Scene.find_node("Player").position)xnumber|Vec2y?number
NavigationAgentNode:nav_stop()
Section titled “NavigationAgentNode:nav_stop()”Stops following the path (velocity 0).
agent:nav_stop()NavigationAgentNode:nav_is_finished()
Section titled “NavigationAgentNode:nav_is_finished()”Arrived (or no target).
if agent:nav_is_finished() then self:look_around() endReturns boolean
NavigationAgentNode:nav_get_path()
Section titled “NavigationAgentNode:nav_get_path()”The waypoints still to go (world).
local left = #agent:nav_get_path() -- waypoints still to goReturns number[][]
NavigationAgentNode:nav_distance_left()
Section titled “NavigationAgentNode:nav_distance_left()”Path length still to go (px).
if agent:nav_distance_left() < 64 then self:slow_down() endReturns number
SkeletonNode
Section titled “SkeletonNode”Inherits Node
Skeletal (cutout) animation from a Spine .json or DragonBones _ske.json export: animations crossfade, skins, IK, events (“skeleton_event”), “animation_finished”; scripts can turn bones.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
file |
string |
The skeleton: a Spine .json export or a DragonBones _ske.json (project-relative). |
atlas |
string |
Its texture atlas; empty = next to it (name.atlas for Spine, name_tex.json for DragonBo… |
armature |
string |
DragonBones: the armature to show (empty = the first). |
animation |
string |
The animation played when the scene starts (and shown in the editor). |
skin |
string |
The skin (attachment set); empty = the default skin. |
loop |
boolean |
Play the animation over and over. |
autoplay |
boolean |
Start the animation when the node becomes ready. |
speed |
number |
Playback speed (1 = as authored). |
mixTime |
number |
Seconds to crossfade from one animation to the next. |
tint |
number[] |
Multiplies every slot’s colour. |
showBones |
boolean |
Draw the bones over the art (also in the game, for debugging). |
SkeletonNode:connect(event, handler)
Section titled “SkeletonNode:connect(event, handler)”Connects a handler to one of this node’s events: animation_finished (A non-looping animation ended (Aseprite: a tag’s repeats are done)), skeleton_event (An event key of the skeleton’s animation fired (its name)); the tree events; custom ones.
self.node:connect("animation_finished", function(value, source) Log.info("animation_finished") end)eventSkeletonNodeEvent|stringhandlerfun(value:any, source: SkeletonNode)
Returns integer id Connection id for disconnect
SkeletonNode:get_property(path)
Section titled “SkeletonNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("file")pathSkeletonNodeProperty|string
Returns any
SkeletonNode:set_property(path, value, y)
Section titled “SkeletonNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("file", "text")pathSkeletonNodeProperty|stringvalueanyy?number
SkeletonNode:skeleton_play(name, loop, mix)
Section titled “SkeletonNode:skeleton_play(name, loop, mix)”Plays an animation (crossfading over mix seconds; default: the node’s Mix Time). False when the skeleton has no such animation.
skel:skeleton_play("run")namestringloop?booleanDefault truemix?numberSeconds
Returns boolean ok
SkeletonNode:skeleton_stop()
Section titled “SkeletonNode:skeleton_stop()”Stops at the current frame.
skel:skeleton_stop()SkeletonNode:skeleton_is_playing()
Section titled “SkeletonNode:skeleton_is_playing()”An animation is playing.
if not skel:skeleton_is_playing() then skel:skeleton_play("idle") endReturns boolean
SkeletonNode:skeleton_set_skin(name)
Section titled “SkeletonNode:skeleton_set_skin(name)”Switches the skin (attachment set).
skel:skeleton_set_skin("armored")namestring
SkeletonNode:skeleton_animations()
Section titled “SkeletonNode:skeleton_animations()”The animations’ names.
for _, a in ipairs(skel:skeleton_animations()) do print(a) endReturns string[]
SkeletonNode:skeleton_skins()
Section titled “SkeletonNode:skeleton_skins()”The skins’ names.
local skins = skel:skeleton_skins()Returns string[]
SkeletonNode:skeleton_bones()
Section titled “SkeletonNode:skeleton_bones()”The bones’ names.
local bones = skel:skeleton_bones()Returns string[]
SkeletonNode:skeleton_bone_position(name)
Section titled “SkeletonNode:skeleton_bone_position(name)”A bone’s position in the world (nil: no such bone).
local muzzle = skel:skeleton_bone_position("gun_tip")namestring
Returns Vec2?
SkeletonNode:skeleton_bone_rotation(name)
Section titled “SkeletonNode:skeleton_bone_rotation(name)”A bone’s rotation in the world (degrees).
local angle = skel:skeleton_bone_rotation("arm")namestring
Returns number?
SkeletonNode:skeleton_set_bone_rotation(name, degrees)
Section titled “SkeletonNode:skeleton_set_bone_rotation(name, degrees)”Overrides a bone’s local rotation (degrees) over the animation; nil gives it back to the animation.
skel:skeleton_set_bone_rotation("arm", aim_angle)namestringdegrees?number
Returns boolean ok
SkeletonNode:skeleton_duration(name)
Section titled “SkeletonNode:skeleton_duration(name)”An animation’s length in seconds (default: the current one).
local t = skel:skeleton_duration("attack")name?string
Returns number
BoneAttachmentNode
Section titled “BoneAttachmentNode”Inherits Node
Under a Skeleton: follows one of its bones (bone, followRotation, followScale) - put a weapon or particles under it.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
bone |
string |
The parent skeleton’s bone this node follows (its children ride along: a weapon in the … |
followRotation |
boolean |
Turn with the bone. |
followScale |
boolean |
Scale with the bone. |
BoneAttachmentNode:get_property(path)
Section titled “BoneAttachmentNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("bone")pathBoneAttachmentNodeProperty|string
Returns any
BoneAttachmentNode:set_property(path, value, y)
Section titled “BoneAttachmentNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("bone", "text")pathBoneAttachmentNodeProperty|stringvalueanyy?number
AsepriteNode
Section titled “AsepriteNode”Inherits Node
An Aseprite file (.aseprite / .ase) shown and played as Aseprite does: tags with their direction and repeat count, per-frame durations, layers hidden / shown per node, the origin following a slice’s pivot; its slices and user data for scripts. Saving the file in Aseprite updates it live. Events: “animation_finished”(tag), “animation_looped”(tag), “frame_changed”(frame).
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
origin |
Vec2 |
Where in the image the position is, and what it rotates and scales around: a fraction o… |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
file |
string |
The Aseprite file (.aseprite / .ase, project-relative). Saving it in Aseprite updates t… |
animation |
string |
The tag played (its direction and repeat count as set in Aseprite); empty = every frame… |
autoplay |
boolean |
Start the animation when the node becomes ready. |
loop |
boolean |
Tags without a repeat count loop; off: they play once. |
speed |
number |
Playback speed (1 = the frame durations set in Aseprite). |
frame |
integer |
The frame shown (0-based): where playing starts, or where it stopped. |
hideLayers |
string |
Layers not drawn (names, comma separated; a group hides its layers). |
showLayers |
string |
Layers hidden in the file but drawn anyway (names, comma separated). |
pivotSlice |
string |
A slice with a pivot (set in Aseprite): the node’s origin follows it, frame by frame. E… |
tint |
number[] |
Multiplies the sprite’s colours. |
AsepriteNode:connect(event, handler)
Section titled “AsepriteNode:connect(event, handler)”Connects a handler to one of this node’s events: animation_finished (A non-looping animation ended (Aseprite: a tag’s repeats are done)), animation_looped (An Aseprite tag started again (a repeat or a ping-pong turn)), frame_changed (The Aseprite node shows another frame (0-based)); the tree events; custom ones.
self.node:connect("animation_finished", function(value, source) Log.info("animation_finished") end)eventAsepriteNodeEvent|stringhandlerfun(value:any, source: AsepriteNode)
Returns integer id Connection id for disconnect
AsepriteNode:get_property(path)
Section titled “AsepriteNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("file")pathAsepriteNodeProperty|string
Returns any
AsepriteNode:set_property(path, value, y)
Section titled “AsepriteNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("file", "text")pathAsepriteNodeProperty|stringvalueanyy?number
AsepriteNode:aseprite_play(tag)
Section titled “AsepriteNode:aseprite_play(tag)”Plays a tag (its direction and repeats as set in Aseprite) from its first frame; nil / “” = every frame. No argument: the node’s Animation.
sprite:aseprite_play("run")tag?string
AsepriteNode:aseprite_stop()
Section titled “AsepriteNode:aseprite_stop()”Stops on the current frame.
sprite:aseprite_stop()AsepriteNode:aseprite_resume()
Section titled “AsepriteNode:aseprite_resume()”Goes on from where it stopped.
if paused_menu_closed then sprite:aseprite_resume() endAsepriteNode:aseprite_is_playing()
Section titled “AsepriteNode:aseprite_is_playing()”A tag is playing (false after its repeats are done, or stopped).
if not sprite:aseprite_is_playing() then sprite:aseprite_play("idle") endReturns boolean
AsepriteNode:aseprite_frame()
Section titled “AsepriteNode:aseprite_frame()”The frame shown (0-based).
if sprite:aseprite_frame() == 3 then shoot() endReturns integer
AsepriteNode:aseprite_set_frame(frame)
Section titled “AsepriteNode:aseprite_set_frame(frame)”Shows a frame (0-based); a playing tag goes on from it.
sprite:aseprite_set_frame(0)frameinteger
AsepriteNode:aseprite_info()
Section titled “AsepriteNode:aseprite_info()”The file: size, frame durations, tags, layers, the sprite’s user data.
for _, tag in ipairs(sprite:aseprite_info().tags) do print(tag.name, tag.direction) endReturns AsepriteInfo?
AsepriteNode:aseprite_slice(name, frame)
Section titled “AsepriteNode:aseprite_slice(name, frame)”A slice in a frame (default: the frame shown) - hitboxes, spawn points, 9-patch panels drawn in Aseprite. nil if it isn’t there.
local hit = sprite:aseprite_slice("hitbox")namestringframe?integer
Returns AsepriteSlice?
AsepriteNode:aseprite_layer_data(layer)
Section titled “AsepriteNode:aseprite_layer_data(layer)”A layer’s user data (text, colour, properties set in Aseprite’s layer properties).
local damage = sprite:aseprite_layer_data("Weapon").properties.damagelayerstring
Returns AsepriteUserData?
AsepriteNode:aseprite_cel_data(layer, frame)
Section titled “AsepriteNode:aseprite_cel_data(layer, frame)”A cel’s user data (a layer in a frame; default: the frame shown).
if sprite:aseprite_cel_data("Body").properties.footstep then play_step() endlayerstringframe?integer
Returns AsepriteUserData?
AsepriteNode:aseprite_set_layer_visible(layer, visible)
Section titled “AsepriteNode:aseprite_set_layer_visible(layer, visible)”Shows or hides a layer (by name; a group: its layers) - outfits, equipment, damage.
sprite:aseprite_set_layer_visible("Helmet", has_helmet)layerstringvisibleboolean
AdvancedCameraNode
Section titled “AdvancedCameraNode”Inherits Node
A virtual camera: follow modes (Glued, Simple, Group, Path, Framed), limits (incl. the LDtk level the target is in), trauma shake; the scene’s camera shows the highest priority one and blends on a switch. “became_active” / “became_inactive”.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
priority |
integer |
The host camera shows the enabled advanced camera with the highest priority (a tie: the… |
followMode |
"None"|"Glued"|"Simple"|"Group"|"Path"|"Framed" |
None (stays where placed), Glued (exactly on the target), Simple (offset, damping, look… |
followTarget |
string |
The node it follows (a path like Player or ../Hero). |
followTargets |
string |
Group: more nodes to frame, comma separated. |
followPath |
string |
Path: the PathNode the camera rides along. |
followOffset |
Vec2 |
Added to the target’s position (px). |
damping |
number |
Smoothing time in seconds: 0 locks on, 0.2-0.5 feels smooth. |
axisLock |
"None"|"X"|"Y"|"XY" |
Don’t follow along these axes (e.g. Y for a side-scroller that never moves vertically). |
lookahead |
number |
Looks ahead of a moving target by this many seconds of its velocity. |
deadZone |
Vec2 |
Framed: the part of the view (fraction of width / height) the target can move in withou… |
zoom |
number |
Zoom (2 = twice as close). |
autoZoom |
boolean |
Group: zoom so every target fits, between Auto Zoom Min and Max. |
autoZoomMin |
number |
Group auto zoom: farthest out. |
autoZoomMax |
number |
Group auto zoom: closest in. |
autoZoomMargin |
number |
Group auto zoom: space kept around the targets (px). |
limitMode |
"None"|"Rect"|"Node"|"LdtkLevel" |
Keeps the view inside: None, Rect (Limit Rect), Node (a TileMap / LDtk level / Navigati… |
limitNode |
string |
Node limits: the node whose bounds the view stays in. |
limitMargin |
number |
Shrinks (+) or grows (-) the limits (px). |
limitBlend |
number |
Seconds to glide to new limits (moving into another LDtk level); 0 = at once. |
blendTime |
number |
Seconds the host takes to move from the previous camera to this one when it becomes act… |
blendEase |
"Linear"|"In_Sine"|"Out_Sine"|"In_Out_Sine"|"In_Quad"|"Out_Quad"|"In_Out_Quad"|"In_Cubic"|"Out_Cubic"|"In_Out_Cubic"|"In_Quart"|"Out_Quart"|"In_Out_Quart"|"In_Expo"|"Out_Expo"|"In_Out_Expo"|"In_Back"|"Out_Back"|"In_Out_Back"|"In_Elastic"|"Out_Elastic"|"In_Out_Elastic"|"In_Bounce"|"Out_Bounce"|"In_Out_Bounce"|"Constant" |
The easing of that blend. |
snapToPixel |
boolean |
Round the position to whole pixels (pixel art). |
shakeIntensity |
number |
Shake offset at full trauma (px). |
shakeRotation |
number |
Shake rotation at full trauma (degrees). |
shakeDecay |
number |
Trauma lost per second. |
shakeFrequency |
number |
How fast the shake moves (noise speed). |
traumaExponent |
number |
Shake = trauma ^ exponent: 2-3 makes small hits subtle and big ones strong. |
trauma |
number |
Current trauma 0..1 (add_trauma stacks it; runtime). |
active |
boolean |
The host camera shows this one now (runtime, read-only). |
AdvancedCameraNode:connect(event, handler)
Section titled “AdvancedCameraNode:connect(event, handler)”Connects a handler to one of this node’s events: became_active (The host camera switched to this advanced camera), became_inactive (Another advanced camera took over); the tree events; custom ones.
self.node:connect("became_active", function(value, source) Log.info("became_active") end)eventAdvancedCameraNodeEvent|stringhandlerfun(value:any, source: AdvancedCameraNode)
Returns integer id Connection id for disconnect
AdvancedCameraNode:get_property(path)
Section titled “AdvancedCameraNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("priority")pathAdvancedCameraNodeProperty|string
Returns any
AdvancedCameraNode:set_property(path, value, y)
Section titled “AdvancedCameraNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("priority", 2)pathAdvancedCameraNodeProperty|stringvalueanyy?number
AdvancedCameraNode:add_trauma(amount)
Section titled “AdvancedCameraNode:add_trauma(amount)”Adds shake trauma (stacks up to 1, decays by Shake Decay per second).
cam:add_trauma(0.4) -- a hitamountnumber0..1
AdvancedCameraNode:make_active()
Section titled “AdvancedCameraNode:make_active()”Raises its priority above every other advanced camera: the host blends to it.
Scene.find_node("BossCam"):make_active()AdvancedCameraNode:is_active()
Section titled “AdvancedCameraNode:is_active()”The scene’s camera shows this one now.
if cam:is_active() then hud:show_hint() endReturns boolean
AdvancedCameraNode:snap()
Section titled “AdvancedCameraNode:snap()”Jumps to where it wants to be now (no damping; ends the blend if active) - after a teleport.
player.position = spawn; cam:snap()PathNode
Section titled “PathNode”Inherits Node
A curve through points with Bézier handles (routes, rails, platforms’ tracks); a PathFollowNode child travels along it.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
closed |
boolean |
Join the last point back to the first (a loop). |
bakeInterval |
number |
Distance between the points the curve is turned into (px): smaller follows the curve mo… |
lineWidth |
number |
Draw the path in the game this wide (rails, ropes); 0 = invisible (the editor always sh… |
color |
number[] |
Colour of the drawn path (and of its outline in the editor). |
PathNode:get_property(path)
Section titled “PathNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("closed")pathPathNodeProperty|string
Returns any
PathNode:set_property(path, value, y)
Section titled “PathNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("closed", true)pathPathNodeProperty|stringvalueanyy?number
PathNode:path_length()
Section titled “PathNode:path_length()”The path’s length in pixels (along the curve).
local len = self.node:get_node("Route"):path_length()Returns number
PathNode:path_point_at(distance)
Section titled “PathNode:path_point_at(distance)”The point at a distance along the path (world) and the direction the path goes there.
local pos, dir = route:path_point_at(route:path_length() * 0.5)distancenumberPixels from the start (clamped)
Returns Vec2 position World position, Vec2 direction Unit vector (world)
PathNode:path_closest_offset(x, y)
Section titled “PathNode:path_closest_offset(x, y)”The distance along the path of the point nearest to a world position (snap something onto the path).
local d = route:path_closest_offset(player.position)xnumber|Vec2y?number
Returns number distance
PathNode:path_point_count()
Section titled “PathNode:path_point_count()”How many points the path has.
for i = 1, route:path_point_count() do print(route:path_get_point(i)) endReturns integer
PathNode:path_get_point(index)
Section titled “PathNode:path_get_point(index)”A point (1-based): its position and its in / out handles, local to the path.
local pos, handle_in, handle_out = route:path_get_point(1)indexinteger
Returns Vec2 position, Vec2 handle_in Offset from the point, Vec2 handle_out Offset from the point
PathNode:path_set_point(index, position, handle_in, handle_out)
Section titled “PathNode:path_set_point(index, position, handle_in, handle_out)”Moves a point (1-based), optionally setting its handles (offsets; zero = a sharp corner).
route:path_set_point(2, Vec2(200, 40), Vec2(-30, 0), Vec2(30, 0))indexintegerpositionVec2handle_in?Vec2handle_out?Vec2
PathNode:path_add_point(position, handle_in, handle_out)
Section titled “PathNode:path_add_point(position, handle_in, handle_out)”Adds a point at the end (local to the path), optionally with handles.
route:path_add_point(Vec2(400, 0))positionVec2handle_in?Vec2handle_out?Vec2
PathNode:path_remove_point(index)
Section titled “PathNode:path_remove_point(index)”Removes a point (1-based).
route:path_remove_point(route:path_point_count())indexinteger
PathNode:path_clear()
Section titled “PathNode:path_clear()”Removes every point.
route:path_clear()PathFollowNode
Section titled “PathFollowNode”Inherits Node
Travels along its parent PathNode: progress (px), speed, loop (Stop / Loop / PingPong), rotate; “path_finished” / “path_looped”.
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
progress |
number |
Distance travelled along the parent path (px). Set it to place the follower; scripts ca… |
speed |
number |
Pixels per second it moves along the path by itself (negative: backwards; 0: only scrip… |
loop |
"Stop"|"Loop"|"PingPong" |
At the end: Stop (path_finished), Loop (start again) or Ping Pong (turn back). |
rotate |
boolean |
Turn to face the direction it travels. |
sideOffset |
number |
Pixels to the side of the path (positive: to the right of the travel direction) - lanes… |
PathFollowNode:connect(event, handler)
Section titled “PathFollowNode:connect(event, handler)”Connects a handler to one of this node’s events: path_finished (The follower reached the end of its path (loop: Stop)), path_looped (The follower wrapped round or turned back (Loop / Ping Pong)); the tree events; custom ones.
self.node:connect("path_finished", function(value, source) Log.info("path_finished") end)eventPathFollowNodeEvent|stringhandlerfun(value:any, source: PathFollowNode)
Returns integer id Connection id for disconnect
PathFollowNode:get_property(path)
Section titled “PathFollowNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("progress")pathPathFollowNodeProperty|string
Returns any
PathFollowNode:set_property(path, value, y)
Section titled “PathFollowNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("progress", 1.5)pathPathFollowNodeProperty|stringvalueanyy?number
PathFollowNode:follow_ratio()
Section titled “PathFollowNode:follow_ratio()”How far along its path the follower is: 0 at the start, 1 at the end.
if platform:follow_ratio() > 0.5 then ... endReturns number
PathFollowNode:follow_set_ratio(ratio)
Section titled “PathFollowNode:follow_set_ratio(ratio)”Puts the follower at a fraction of its path (0..1) at once.
platform:follow_set_ratio(0.25)rationumber
PathFollowNode:follow_restart()
Section titled “PathFollowNode:follow_restart()”Back to the start, moving forwards again (after “path_finished”).
self.node:get_node("Route/Cart"):follow_restart()UIContainerNode
Section titled “UIContainerNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
title |
string |
Header text. |
direction |
"Vertical"|"Horizontal"|"Grid" |
Children are laid out in a column, a row or a grid. |
alignment |
"Start"|"Center"|"End"|"Stretch" |
Where children sit across the layout direction. |
spacing |
number |
Gap between items (px). |
paddingTop |
number |
Space above the children (px). |
paddingBottom |
number |
Space below the children (px). |
paddingLeft |
number |
Space left of the children (px). |
paddingRight |
number |
Space right of the children (px). |
columns |
integer |
Grid layout: columns per row. |
autoSizeHeight |
boolean |
Grow to fit the children. |
drawBackground |
boolean |
Fill the background. |
drawBorder |
boolean |
Draw a border. |
showHeader |
boolean |
Draw a header with the title. |
headerHeight |
number |
Height of the header (px). |
backgroundColor |
number[] |
Fill colour of the background. |
headerColor |
number[] |
Header fill colour. |
borderColor |
number[] |
Colour of the border. |
titleColor |
number[] |
Title text colour. |
UIContainerNode:get_property(path)
Section titled “UIContainerNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIContainerNodeProperty|string
Returns any
UIContainerNode:set_property(path, value, y)
Section titled “UIContainerNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIContainerNodeProperty|stringvalueanyy?number
UILabelNode
Section titled “UILabelNode”Inherits Node, TextHolder
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
text |
string |
Label text. |
fontSize |
number |
Text size (px). |
textColor |
number[] |
Colour of the text. |
align |
"Left"|"Center"|"Right" |
Horizontal text alignment. |
drawBackground |
boolean |
Fill the background. |
backgroundColor |
number[] |
Fill colour of the background. |
UILabelNode:get_property(path)
Section titled “UILabelNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUILabelNodeProperty|string
Returns any
UILabelNode:set_property(path, value, y)
Section titled “UILabelNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUILabelNodeProperty|stringvalueanyy?number
UIButtonNode
Section titled “UIButtonNode”Inherits Node, TextHolder
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
text |
string |
Button caption. |
fontSize |
number |
Text size (px). |
icon |
"None"|"Digit0"|"Digit1"|"Digit2"|"Digit3"|"Digit4"|"Digit5"|"Digit6"|"Digit7"|"Digit8"|"Digit9"|"A"|"AddressBook"|"AddressCard"|"AlignCenter"|"AlignJustify"|"AlignLeft"|"AlignRight"|"Anchor"|"AnchorCircleCheck"|"AnchorCircleExclamation"|"AnchorCircleXmark"|"AnchorLock"|"AngleDown"|"AngleLeft"|"AngleRight"|"AngleUp"|"AnglesDown"|"AnglesLeft"|"AnglesRight"|"AnglesUp"|"Ankh"|"AppleWhole"|"Archway"|"ArrowDown"|"ArrowDown19"|"ArrowDown91"|"ArrowDownAZ"|"ArrowDownLong"|"ArrowDownShortWide"|"ArrowDownUpAcrossLine"|"ArrowDownUpLock"|"ArrowDownWideShort"|"ArrowDownZA"|"ArrowLeft"|"ArrowLeftLong"|"ArrowPointer"|"ArrowRight"|"ArrowRightArrowLeft"|"ArrowRightFromBracket"|"ArrowRightLong"|"ArrowRightToBracket"|"ArrowRightToCity"|"ArrowRotateLeft"|"ArrowRotateRight"|"ArrowTrendDown"|"ArrowTrendUp"|"ArrowTurnDown"|"ArrowTurnUp"|"ArrowUp"|"ArrowUp19"|"ArrowUp91"|"ArrowUpAZ"|"ArrowUpFromBracket"|"ArrowUpFromGroundWater"|"ArrowUpFromWaterPump"|"ArrowUpLong"|"ArrowUpRightDots"|"ArrowUpRightFromSquare"|"ArrowUpShortWide"|"ArrowUpWideShort"|"ArrowUpZA"|"ArrowsDownToLine"|"ArrowsDownToPeople"|"ArrowsLeftRight"|"ArrowsLeftRightToLine"|"ArrowsRotate"|"ArrowsSpin"|"ArrowsSplitUpAndLeft"|"ArrowsToCircle"|"ArrowsToDot"|"ArrowsToEye"|"ArrowsTurnRight"|"ArrowsTurnToDots"|"ArrowsUpDown"|"ArrowsUpDownLeftRight"|"ArrowsUpToLine"|"Asterisk"|"At"|"Atom"|"AudioDescription"|"AustralSign"|"Award"|"B"|"Baby"|"BabyCarriage"|"Backward"|"BackwardFast"|"BackwardStep"|"Bacon"|"Bacteria"|"Bacterium"|"BagShopping"|"Bahai"|"BahtSign"|"Ban"|"BanSmoking"|"Bandage"|"BangladeshiTakaSign"|"Barcode"|"Bars"|"BarsProgress"|"BarsStaggered"|"Baseball"|"BaseballBatBall"|"BasketShopping"|"Basketball"|"Bath"|"BatteryEmpty"|"BatteryFull"|"BatteryHalf"|"BatteryQuarter"|"BatteryThreeQuarters"|"Bed"|"BedPulse"|"BeerMugEmpty"|"Bell"|"BellConcierge"|"BellSlash"|"BezierCurve"|"Bicycle"|"Binoculars"|"Biohazard"|"BitcoinSign"|"Blender"|"BlenderPhone"|"Blog"|"Bold"|"Bolt"|"BoltLightning"|"Bomb"|"Bone"|"Bong"|"Book"|"BookAtlas"|"BookBible"|"BookBookmark"|"BookJournalWhills"|"BookMedical"|"BookOpen"|"BookOpenReader"|"BookQuran"|"BookSkull"|"BookTanakh"|"Bookmark"|"BorderAll"|"BorderNone"|"BorderTopLeft"|"BoreHole"|"BottleDroplet"|"BottleWater"|"BowlFood"|"BowlRice"|"BowlingBall"|"Box"|"BoxArchive"|"BoxOpen"|"BoxTissue"|"BoxesPacking"|"BoxesStacked"|"Braille"|"Brain"|"BrazilianRealSign"|"BreadSlice"|"Bridge"|"BridgeCircleCheck"|"BridgeCircleExclamation"|"BridgeCircleXmark"|"BridgeLock"|"BridgeWater"|"Briefcase"|"BriefcaseMedical"|"Broom"|"BroomBall"|"Brush"|"Bucket"|"Bug"|"BugSlash"|"Bugs"|"Building"|"BuildingCircleArrowRight"|"BuildingCircleCheck"|"BuildingCircleExclamation"|"BuildingCircleXmark"|"BuildingColumns"|"BuildingFlag"|"BuildingLock"|"BuildingNgo"|"BuildingShield"|"BuildingUn"|"BuildingUser"|"BuildingWheat"|"Bullhorn"|"Bullseye"|"Burger"|"Burst"|"Bus"|"BusSimple"|"BusinessTime"|"C"|"CableCar"|"CakeCandles"|"Calculator"|"Calendar"|"CalendarCheck"|"CalendarDay"|"CalendarDays"|"CalendarMinus"|"CalendarPlus"|"CalendarWeek"|"CalendarXmark"|"Camera"|"CameraRetro"|"CameraRotate"|"Campground"|"CandyCane"|"Cannabis"|"Capsules"|"Car"|"CarBattery"|"CarBurst"|"CarOn"|"CarRear"|"CarSide"|"CarTunnel"|"Caravan"|"CaretDown"|"CaretLeft"|"CaretRight"|"CaretUp"|"Carrot"|"CartArrowDown"|"CartFlatbed"|"CartFlatbedSuitcase"|"CartPlus"|"CartShopping"|"CashRegister"|"Cat"|"CediSign"|"CentSign"|"Certificate"|"Chair"|"Chalkboard"|"ChalkboardUser"|"ChampagneGlasses"|"ChargingStation"|"ChartArea"|"ChartBar"|"ChartColumn"|"ChartDiagram"|"ChartGantt"|"ChartLine"|"ChartPie"|"ChartSimple"|"Check"|"CheckDouble"|"CheckToSlot"|"Cheese"|"Chess"|"ChessBishop"|"ChessBoard"|"ChessKing"|"ChessKnight"|"ChessPawn"|"ChessQueen"|"ChessRook"|"ChevronDown"|"ChevronLeft"|"ChevronRight"|"ChevronUp"|"Child"|"ChildCombatant"|"ChildDress"|"ChildReaching"|"Children"|"Church"|"Circle"|"CircleArrowDown"|"CircleArrowLeft"|"CircleArrowRight"|"CircleArrowUp"|"CircleCheck"|"CircleChevronDown"|"CircleChevronLeft"|"CircleChevronRight"|"CircleChevronUp"|"CircleDollarToSlot"|"CircleDot"|"CircleDown"|"CircleExclamation"|"CircleH"|"CircleHalfStroke"|"CircleInfo"|"CircleLeft"|"CircleMinus"|"CircleNodes"|"CircleNotch"|"CirclePause"|"CirclePlay"|"CirclePlus"|"CircleQuestion"|"CircleRadiation"|"CircleRight"|"CircleStop"|"CircleUp"|"CircleUser"|"CircleXmark"|"City"|"Clapperboard"|"Clipboard"|"ClipboardCheck"|"ClipboardList"|"ClipboardQuestion"|"ClipboardUser"|"Clock"|"ClockRotateLeft"|"Clone"|"ClosedCaptioning"|"Cloud"|"CloudArrowDown"|"CloudArrowUp"|"CloudBolt"|"CloudMeatball"|"CloudMoon"|"CloudMoonRain"|"CloudRain"|"CloudShowersHeavy"|"CloudShowersWater"|"CloudSun"|"CloudSunRain"|"Clover"|"Code"|"CodeBranch"|"CodeCommit"|"CodeCompare"|"CodeFork"|"CodeMerge"|"CodePullRequest"|"Coins"|"ColonSign"|"Comment"|"CommentDollar"|"CommentDots"|"CommentMedical"|"CommentNodes"|"CommentSlash"|"CommentSms"|"Comments"|"CommentsDollar"|"CompactDisc"|"Compass"|"CompassDrafting"|"Compress"|"Computer"|"ComputerMouse"|"Cookie"|"CookieBite"|"Copy"|"Copyright"|"Couch"|"Cow"|"CreditCard"|"Crop"|"CropSimple"|"Cross"|"Crosshairs"|"Crow"|"Crown"|"Crutch"|"CruzeiroSign"|"Cube"|"Cubes"|"CubesStacked"|"D"|"Database"|"DeleteLeft"|"Democrat"|"Desktop"|"Dharmachakra"|"DiagramNext"|"DiagramPredecessor"|"DiagramProject"|"DiagramSuccessor"|"Diamond"|"DiamondTurnRight"|"Dice"|"DiceD20"|"DiceD6"|"DiceFive"|"DiceFour"|"DiceOne"|"DiceSix"|"DiceThree"|"DiceTwo"|"Disease"|"Display"|"Divide"|"Dna"|"Dog"|"DollarSign"|"Dolly"|"DongSign"|"DoorClosed"|"DoorOpen"|"Dove"|"DownLeftAndUpRightToCenter"|"DownLong"|"Download"|"Dragon"|"DrawPolygon"|"Droplet"|"DropletSlash"|"Drum"|"DrumSteelpan"|"DrumstickBite"|"Dumbbell"|"Dumpster"|"DumpsterFire"|"Dungeon"|"E"|"EarDeaf"|"EarListen"|"EarthAfrica"|"EarthAmericas"|"EarthAsia"|"EarthEurope"|"EarthOceania"|"Egg"|"Eject"|"Elevator"|"Ellipsis"|"EllipsisVertical"|"Envelope"|"EnvelopeCircleCheck"|"EnvelopeOpen"|"EnvelopeOpenText"|"EnvelopesBulk"|"Equals"|"Eraser"|"Ethernet"|"EuroSign"|"Exclamation"|"Expand"|"Explosion"|"Eye"|"EyeDropper"|"EyeLowVision"|"EyeSlash"|"F"|"FaceAngry"|"FaceDizzy"|"FaceFlushed"|"FaceFrown"|"FaceFrownOpen"|"FaceGrimace"|"FaceGrin"|"FaceGrinBeam"|"FaceGrinBeamSweat"|"FaceGrinHearts"|"FaceGrinSquint"|"FaceGrinSquintTears"|"FaceGrinStars"|"FaceGrinTears"|"FaceGrinTongue"|"FaceGrinTongueSquint"|"FaceGrinTongueWink"|"FaceGrinWide"|"FaceGrinWink"|"FaceKiss"|"FaceKissBeam"|"FaceKissWinkHeart"|"FaceLaugh"|"FaceLaughBeam"|"FaceLaughSquint"|"FaceLaughWink"|"FaceMeh"|"FaceMehBlank"|"FaceRollingEyes"|"FaceSadCry"|"FaceSadTear"|"FaceSmile"|"FaceSmileBeam"|"FaceSmileWink"|"FaceSurprise"|"FaceTired"|"Fan"|"Faucet"|"FaucetDrip"|"Fax"|"Feather"|"FeatherPointed"|"Ferry"|"File"|"FileArrowDown"|"FileArrowUp"|"FileAudio"|"FileCircleCheck"|"FileCircleExclamation"|"FileCircleMinus"|"FileCirclePlus"|"FileCircleQuestion"|"FileCircleXmark"|"FileCode"|"FileContract"|"FileCsv"|"FileExcel"|"FileExport"|"FileFragment"|"FileHalfDashed"|"FileImage"|"FileImport"|"FileInvoice"|"FileInvoiceDollar"|"FileLines"|"FileMedical"|"FilePdf"|"FilePen"|"FilePowerpoint"|"FilePrescription"|"FileShield"|"FileSignature"|"FileVideo"|"FileWaveform"|"FileWord"|"FileZipper"|"Fill"|"FillDrip"|"Film"|"Filter"|"FilterCircleDollar"|"FilterCircleXmark"|"Fingerprint"|"Fire"|"FireBurner"|"FireExtinguisher"|"FireFlameCurved"|"FireFlameSimple"|"Fish"|"FishFins"|"Flag"|"FlagCheckered"|"FlagUsa"|"Flask"|"FlaskVial"|"FloppyDisk"|"FlorinSign"|"Folder"|"FolderClosed"|"FolderMinus"|"FolderOpen"|"FolderPlus"|"FolderTree"|"Font"|"FontAwesome"|"Football"|"Forward"|"ForwardFast"|"ForwardStep"|"FrancSign"|"Frog"|"Futbol"|"G"|"Gamepad"|"GasPump"|"Gauge"|"GaugeHigh"|"GaugeSimple"|"GaugeSimpleHigh"|"Gavel"|"Gear"|"Gears"|"Gem"|"Genderless"|"Ghost"|"Gift"|"Gifts"|"GlassWater"|"GlassWaterDroplet"|"Glasses"|"Globe"|"GolfBallTee"|"Gopuram"|"GraduationCap"|"GreaterThan"|"GreaterThanEqual"|"Grip"|"GripLines"|"GripLinesVertical"|"GripVertical"|"GroupArrowsRotate"|"GuaraniSign"|"Guitar"|"Gun"|"H"|"Hammer"|"Hamsa"|"Hand"|"HandBackFist"|"HandDots"|"HandFist"|"HandHolding"|"HandHoldingDollar"|"HandHoldingDroplet"|"HandHoldingHand"|"HandHoldingHeart"|"HandHoldingMedical"|"HandLizard"|"HandMiddleFinger"|"HandPeace"|"HandPointDown"|"HandPointLeft"|"HandPointRight"|"HandPointUp"|"HandPointer"|"HandScissors"|"HandSparkles"|"HandSpock"|"Handcuffs"|"Hands"|"HandsAslInterpreting"|"HandsBound"|"HandsBubbles"|"HandsClapping"|"HandsHolding"|"HandsHoldingChild"|"HandsHoldingCircle"|"HandsPraying"|"Handshake"|"HandshakeAngle"|"HandshakeSimple"|"HandshakeSimpleSlash"|"HandshakeSlash"|"Hanukiah"|"HardDrive"|"Hashtag"|"HatCowboy"|"HatCowboySide"|"HatWizard"|"HeadSideCough"|"HeadSideCoughSlash"|"HeadSideMask"|"HeadSideVirus"|"Heading"|"Headphones"|"HeadphonesSimple"|"Headset"|"Heart"|"HeartCircleBolt"|"HeartCircleCheck"|"HeartCircleExclamation"|"HeartCircleMinus"|"HeartCirclePlus"|"HeartCircleXmark"|"HeartCrack"|"HeartPulse"|"Helicopter"|"HelicopterSymbol"|"HelmetSafety"|"HelmetUn"|"HexagonNodes"|"HexagonNodesBolt"|"Highlighter"|"HillAvalanche"|"HillRockslide"|"Hippo"|"HockeyPuck"|"HollyBerry"|"Horse"|"HorseHead"|"Hospital"|"HospitalUser"|"HotTubPerson"|"Hotdog"|"Hotel"|"Hourglass"|"HourglassEnd"|"HourglassHalf"|"HourglassStart"|"House"|"HouseChimney"|"HouseChimneyCrack"|"HouseChimneyMedical"|"HouseChimneyUser"|"HouseChimneyWindow"|"HouseCircleCheck"|"HouseCircleExclamation"|"HouseCircleXmark"|"HouseCrack"|"HouseFire"|"HouseFlag"|"HouseFloodWater"|"HouseFloodWaterCircleArrowRight"|"HouseLaptop"|"HouseLock"|"HouseMedical"|"HouseMedicalCircleCheck"|"HouseMedicalCircleExclamation"|"HouseMedicalCircleXmark"|"HouseMedicalFlag"|"HouseSignal"|"HouseTsunami"|"HouseUser"|"HryvniaSign"|"Hurricane"|"I"|"ICursor"|"IceCream"|"Icicles"|"Icons"|"IdBadge"|"IdCard"|"IdCardClip"|"Igloo"|"Image"|"ImagePortrait"|"Images"|"Inbox"|"Indent"|"IndianRupeeSign"|"Industry"|"Infinity"|"Info"|"Italic"|"J"|"Jar"|"JarWheat"|"Jedi"|"JetFighter"|"JetFighterUp"|"Joint"|"JugDetergent"|"K"|"Kaaba"|"Key"|"Keyboard"|"Khanda"|"KipSign"|"KitMedical"|"KitchenSet"|"KiwiBird"|"L"|"LandMineOn"|"Landmark"|"LandmarkDome"|"LandmarkFlag"|"Language"|"Laptop"|"LaptopCode"|"LaptopFile"|"LaptopMedical"|"LariSign"|"LayerGroup"|"Leaf"|"LeftLong"|"LeftRight"|"Lemon"|"LessThan"|"LessThanEqual"|"LifeRing"|"Lightbulb"|"LinesLeaning"|"Link"|"LinkSlash"|"LiraSign"|"List"|"ListCheck"|"ListOl"|"ListUl"|"LitecoinSign"|"LocationArrow"|"LocationCrosshairs"|"LocationDot"|"LocationPin"|"LocationPinLock"|"Lock"|"LockOpen"|"Locust"|"Lungs"|"LungsVirus"|"M"|"Magnet"|"MagnifyingGlass"|"MagnifyingGlassArrowRight"|"MagnifyingGlassChart"|"MagnifyingGlassDollar"|"MagnifyingGlassLocation"|"MagnifyingGlassMinus"|"MagnifyingGlassPlus"|"ManatSign"|"Map"|"MapLocation"|"MapLocationDot"|"MapPin"|"Marker"|"Mars"|"MarsAndVenus"|"MarsAndVenusBurst"|"MarsDouble"|"MarsStroke"|"MarsStrokeRight"|"MarsStrokeUp"|"MartiniGlass"|"MartiniGlassCitrus"|"MartiniGlassEmpty"|"Mask"|"MaskFace"|"MaskVentilator"|"MasksTheater"|"MattressPillow"|"Maximize"|"Medal"|"Memory"|"Menorah"|"Mercury"|"Message"|"Meteor"|"Microchip"|"Microphone"|"MicrophoneLines"|"MicrophoneLinesSlash"|"MicrophoneSlash"|"Microscope"|"MillSign"|"Minimize"|"Minus"|"Mitten"|"Mobile"|"MobileButton"|"MobileRetro"|"MobileScreen"|"MobileScreenButton"|"MoneyBill"|"MoneyBill1"|"MoneyBill1Wave"|"MoneyBillTransfer"|"MoneyBillTrendUp"|"MoneyBillWave"|"MoneyBillWheat"|"MoneyBills"|"MoneyCheck"|"MoneyCheckDollar"|"Monument"|"Moon"|"MortarPestle"|"Mosque"|"Mosquito"|"MosquitoNet"|"Motorcycle"|"Mound"|"Mountain"|"MountainCity"|"MountainSun"|"MugHot"|"MugSaucer"|"Music"|"N"|"NairaSign"|"NetworkWired"|"Neuter"|"Newspaper"|"NotEqual"|"Notdef"|"NoteSticky"|"NotesMedical"|"O"|"ObjectGroup"|"ObjectUngroup"|"OilCan"|"OilWell"|"Om"|"Otter"|"Outdent"|"P"|"Pager"|"PaintRoller"|"Paintbrush"|"Palette"|"Pallet"|"Panorama"|"PaperPlane"|"Paperclip"|"ParachuteBox"|"Paragraph"|"Passport"|"Paste"|"Pause"|"Paw"|"Peace"|"Pen"|"PenClip"|"PenFancy"|"PenNib"|"PenRuler"|"PenToSquare"|"Pencil"|"PeopleArrows"|"PeopleCarryBox"|"PeopleGroup"|"PeopleLine"|"PeoplePulling"|"PeopleRobbery"|"PeopleRoof"|"PepperHot"|"Percent"|"Person"|"PersonArrowDownToLine"|"PersonArrowUpFromLine"|"PersonBiking"|"PersonBooth"|"PersonBreastfeeding"|"PersonBurst"|"PersonCane"|"PersonChalkboard"|"PersonCircleCheck"|"PersonCircleExclamation"|"PersonCircleMinus"|"PersonCirclePlus"|"PersonCircleQuestion"|"PersonCircleXmark"|"PersonDigging"|"PersonDotsFromLine"|"PersonDress"|"PersonDressBurst"|"PersonDrowning"|"PersonFalling"|"PersonFallingBurst"|"PersonHalfDress"|"PersonHarassing"|"PersonHiking"|"PersonMilitaryPointing"|"PersonMilitaryRifle"|"PersonMilitaryToPerson"|"PersonPraying"|"PersonPregnant"|"PersonRays"|"PersonRifle"|"PersonRunning"|"PersonShelter"|"PersonSkating"|"PersonSkiing"|"PersonSkiingNordic"|"PersonSnowboarding"|"PersonSwimming"|"PersonThroughWindow"|"PersonWalking"|"PersonWalkingArrowLoopLeft"|"PersonWalkingArrowRight"|"PersonWalkingDashedLineArrowRight"|"PersonWalkingLuggage"|"PersonWalkingWithCane"|"PesetaSign"|"PesoSign"|"Phone"|"PhoneFlip"|"PhoneSlash"|"PhoneVolume"|"PhotoFilm"|"PiggyBank"|"Pills"|"PizzaSlice"|"PlaceOfWorship"|"Plane"|"PlaneArrival"|"PlaneCircleCheck"|"PlaneCircleExclamation"|"PlaneCircleXmark"|"PlaneDeparture"|"PlaneLock"|"PlaneSlash"|"PlaneUp"|"PlantWilt"|"PlateWheat"|"Play"|"Plug"|"PlugCircleBolt"|"PlugCircleCheck"|"PlugCircleExclamation"|"PlugCircleMinus"|"PlugCirclePlus"|"PlugCircleXmark"|"Plus"|"PlusMinus"|"Podcast"|"Poo"|"PooStorm"|"Poop"|"PowerOff"|"Prescription"|"PrescriptionBottle"|"PrescriptionBottleMedical"|"Print"|"PumpMedical"|"PumpSoap"|"PuzzlePiece"|"Q"|"Qrcode"|"Question"|"QuoteLeft"|"QuoteRight"|"R"|"Radiation"|"Radio"|"Rainbow"|"RankingStar"|"Receipt"|"RecordVinyl"|"RectangleAd"|"RectangleList"|"RectangleXmark"|"Recycle"|"Registered"|"Repeat"|"Reply"|"ReplyAll"|"Republican"|"Restroom"|"Retweet"|"Ribbon"|"RightFromBracket"|"RightLeft"|"RightLong"|"RightToBracket"|"Ring"|"Road"|"RoadBarrier"|"RoadBridge"|"RoadCircleCheck"|"RoadCircleExclamation"|"RoadCircleXmark"|"RoadLock"|"RoadSpikes"|"Robot"|"Rocket"|"Rotate"|"RotateLeft"|"RotateRight"|"Route"|"Rss"|"RubleSign"|"Rug"|"Ruler"|"RulerCombined"|"RulerHorizontal"|"RulerVertical"|"RupeeSign"|"RupiahSign"|"S"|"SackDollar"|"SackXmark"|"Sailboat"|"Satellite"|"SatelliteDish"|"ScaleBalanced"|"ScaleUnbalanced"|"ScaleUnbalancedFlip"|"School"|"SchoolCircleCheck"|"SchoolCircleExclamation"|"SchoolCircleXmark"|"SchoolFlag"|"SchoolLock"|"Scissors"|"Screwdriver"|"ScrewdriverWrench"|"Scroll"|"ScrollTorah"|"SdCard"|"Section"|"Seedling"|"Server"|"Shapes"|"Share"|"ShareFromSquare"|"ShareNodes"|"SheetPlastic"|"ShekelSign"|"Shield"|"ShieldCat"|"ShieldDog"|"ShieldHalved"|"ShieldHeart"|"ShieldVirus"|"Ship"|"Shirt"|"ShoePrints"|"Shop"|"ShopLock"|"ShopSlash"|"Shower"|"Shrimp"|"Shuffle"|"ShuttleSpace"|"SignHanging"|"Signal"|"Signature"|"SignsPost"|"SimCard"|"Sink"|"Sitemap"|"Skull"|"SkullCrossbones"|"Slash"|"Sleigh"|"Sliders"|"Smog"|"Smoking"|"Snowflake"|"Snowman"|"Snowplow"|"Soap"|"Socks"|"SolarPanel"|"Sort"|"SortDown"|"SortUp"|"Spa"|"SpaghettiMonsterFlying"|"SpellCheck"|"Spider"|"Spinner"|"Splotch"|"Spoon"|"SprayCan"|"SprayCanSparkles"|"Square"|"SquareArrowUpRight"|"SquareBinary"|"SquareCaretDown"|"SquareCaretLeft"|"SquareCaretRight"|"SquareCaretUp"|"SquareCheck"|"SquareEnvelope"|"SquareFull"|"SquareH"|"SquareMinus"|"SquareNfi"|"SquareParking"|"SquarePen"|"SquarePersonConfined"|"SquarePhone"|"SquarePhoneFlip"|"SquarePlus"|"SquarePollHorizontal"|"SquarePollVertical"|"SquareRootVariable"|"SquareRss"|"SquareShareNodes"|"SquareUpRight"|"SquareVirus"|"SquareXmark"|"StaffSnake"|"Stairs"|"Stamp"|"Stapler"|"Star"|"StarAndCrescent"|"StarHalf"|"StarHalfStroke"|"StarOfDavid"|"StarOfLife"|"SterlingSign"|"Stethoscope"|"Stop"|"Stopwatch"|"Stopwatch20"|"Store"|"StoreSlash"|"StreetView"|"Strikethrough"|"Stroopwafel"|"Subscript"|"Suitcase"|"SuitcaseMedical"|"SuitcaseRolling"|"Sun"|"SunPlantWilt"|"Superscript"|"Swatchbook"|"Synagogue"|"Syringe"|"T"|"Table"|"TableCells"|"TableCellsColumnLock"|"TableCellsLarge"|"TableCellsRowLock"|"TableCellsRowUnlock"|"TableColumns"|"TableList"|"TableTennisPaddleBall"|"Tablet"|"TabletButton"|"TabletScreenButton"|"Tablets"|"TachographDigital"|"Tag"|"Tags"|"Tape"|"Tarp"|"TarpDroplet"|"Taxi"|"Teeth"|"TeethOpen"|"TemperatureArrowDown"|"TemperatureArrowUp"|"TemperatureEmpty"|"TemperatureFull"|"TemperatureHalf"|"TemperatureHigh"|"TemperatureLow"|"TemperatureQuarter"|"TemperatureThreeQuarters"|"TengeSign"|"Tent"|"TentArrowDownToLine"|"TentArrowLeftRight"|"TentArrowTurnLeft"|"TentArrowsDown"|"Tents"|"Terminal"|"TextHeight"|"TextSlash"|"TextWidth"|"Thermometer"|"ThumbsDown"|"ThumbsUp"|"Thumbtack"|"ThumbtackSlash"|"Ticket"|"TicketSimple"|"Timeline"|"ToggleOff"|"ToggleOn"|"Toilet"|"ToiletPaper"|"ToiletPaperSlash"|"ToiletPortable"|"ToiletsPortable"|"Toolbox"|"Tooth"|"ToriiGate"|"Tornado"|"TowerBroadcast"|"TowerCell"|"TowerObservation"|"Tractor"|"Trademark"|"TrafficLight"|"Trailer"|"Train"|"TrainSubway"|"TrainTram"|"Transgender"|"Trash"|"TrashArrowUp"|"TrashCan"|"TrashCanArrowUp"|"Tree"|"TreeCity"|"TriangleExclamation"|"Trophy"|"Trowel"|"TrowelBricks"|"Truck"|"TruckArrowRight"|"TruckDroplet"|"TruckFast"|"TruckField"|"TruckFieldUn"|"TruckFront"|"TruckMedical"|"TruckMonster"|"TruckMoving"|"TruckPickup"|"TruckPlane"|"TruckRampBox"|"Tty"|"TurkishLiraSign"|"TurnDown"|"TurnUp"|"Tv"|"U"|"Umbrella"|"UmbrellaBeach"|"Underline"|"UniversalAccess"|"Unlock"|"UnlockKeyhole"|"UpDown"|"UpDownLeftRight"|"UpLong"|"UpRightAndDownLeftFromCenter"|"UpRightFromSquare"|"Upload"|"User"|"UserAstronaut"|"UserCheck"|"UserClock"|"UserDoctor"|"UserGear"|"UserGraduate"|"UserGroup"|"UserInjured"|"UserLarge"|"UserLargeSlash"|"UserLock"|"UserMinus"|"UserNinja"|"UserNurse"|"UserPen"|"UserPlus"|"UserSecret"|"UserShield"|"UserSlash"|"UserTag"|"UserTie"|"UserXmark"|"Users"|"UsersBetweenLines"|"UsersGear"|"UsersLine"|"UsersRays"|"UsersRectangle"|"UsersSlash"|"UsersViewfinder"|"Utensils"|"V"|"VanShuttle"|"Vault"|"VectorSquare"|"Venus"|"VenusDouble"|"VenusMars"|"Vest"|"VestPatches"|"Vial"|"VialCircleCheck"|"VialVirus"|"Vials"|"Video"|"VideoSlash"|"Vihara"|"Virus"|"VirusCovid"|"VirusCovidSlash"|"VirusSlash"|"Viruses"|"Voicemail"|"Volcano"|"Volleyball"|"VolumeHigh"|"VolumeLow"|"VolumeOff"|"VolumeXmark"|"VrCardboard"|"W"|"WalkieTalkie"|"Wallet"|"WandMagic"|"WandMagicSparkles"|"WandSparkles"|"Warehouse"|"Water"|"WaterLadder"|"WaveSquare"|"WebAwesome"|"WeightHanging"|"WeightScale"|"WheatAwn"|"WheatAwnCircleExclamation"|"Wheelchair"|"WheelchairMove"|"WhiskeyGlass"|"Wifi"|"Wind"|"WindowMaximize"|"WindowMinimize"|"WindowRestore"|"WineBottle"|"WineGlass"|"WineGlassEmpty"|"WonSign"|"Worm"|"Wrench"|"X"|"XRay"|"Xmark"|"XmarksLines"|"Y"|"YenSign"|"YinYang"|"Z"|"Search"|"Save"|"Settings"|"Cog"|"Home"|"Edit"|"Close"|"Cancel"|"Refresh"|"Warning"|"CheckCircle"|"TimesCircle"|"VolumeMute"|"Cut"|"Undo"|"Redo"|"StepForward"|"StepBackward"|"Pin"|"ZoomIn"|"ZoomOut" |
Icon shown (Font Awesome). |
iconSize |
number |
Icon size (px). |
normalColor |
number[] |
Fill colour at rest. |
hoverColor |
number[] |
Fill colour under the mouse. |
pressedColor |
number[] |
Fill colour while pressed. |
borderColor |
number[] |
Colour of the border. |
textColor |
number[] |
Colour of the text. |
align |
"Left"|"Center"|"Right" |
Horizontal text alignment. |
UIButtonNode:connect(event, handler)
Section titled “UIButtonNode:connect(event, handler)”Connects a handler to one of this node’s events: clicked (The button was clicked); the tree events; custom ones.
self.node:connect("clicked", function(value, source) Log.info("clicked") end)eventUIButtonNodeEvent|stringhandlerfun(value:any, source: UIButtonNode)
Returns integer id Connection id for disconnect
UIButtonNode:get_property(path)
Section titled “UIButtonNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIButtonNodeProperty|string
Returns any
UIButtonNode:set_property(path, value, y)
Section titled “UIButtonNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIButtonNodeProperty|stringvalueanyy?number
UISliderNode
Section titled “UISliderNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
value |
number |
Current value (between min and max). |
minValue |
number |
Lowest value. |
maxValue |
number |
Highest value. |
defaultValue |
number |
Value restored by reset (double-click). |
fineScale |
number |
Drag speed with Shift held (fine adjustment). |
isInteger |
boolean |
Snap to whole numbers. |
showResetButton |
boolean |
Show a button that restores the default value. |
labelWidth |
number |
Width reserved for the label (px); 0 = none. |
UISliderNode:connect(event, handler)
Section titled “UISliderNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUISliderNodeEvent|stringhandlerfun(value:any, source: UISliderNode)
Returns integer id Connection id for disconnect
UISliderNode:get_property(path)
Section titled “UISliderNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUISliderNodeProperty|string
Returns any
UISliderNode:set_property(path, value, y)
Section titled “UISliderNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUISliderNodeProperty|stringvalueanyy?number
UICheckboxNode
Section titled “UICheckboxNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
checked |
boolean |
Ticked now. |
defaultChecked |
boolean |
State restored by reset. |
accentColor |
number[] |
Tick and fill colour. |
boxSize |
number |
Box size (px). |
UICheckboxNode:connect(event, handler)
Section titled “UICheckboxNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUICheckboxNodeEvent|stringhandlerfun(value:any, source: UICheckboxNode)
Returns integer id Connection id for disconnect
UICheckboxNode:get_property(path)
Section titled “UICheckboxNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUICheckboxNodeProperty|string
Returns any
UICheckboxNode:set_property(path, value, y)
Section titled “UICheckboxNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUICheckboxNodeProperty|stringvalueanyy?number
UIProgressBarNode
Section titled “UIProgressBarNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
value |
number |
Progress (between min and max). |
minValue |
number |
Lowest value. |
maxValue |
number |
Highest value. |
fillColor |
number[] |
Colour of the filled part. |
direction |
"Horizontal"|"Vertical" |
Direction the bar fills. |
showText |
boolean |
Show the percentage. |
UIProgressBarNode:get_property(path)
Section titled “UIProgressBarNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIProgressBarNodeProperty|string
Returns any
UIProgressBarNode:set_property(path, value, y)
Section titled “UIProgressBarNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIProgressBarNodeProperty|stringvalueanyy?number
UITextInputNode
Section titled “UITextInputNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
labelWidth |
number |
Width reserved for the label (px); 0 = none. |
maxLength |
integer |
Most characters accepted. |
UITextInputNode:connect(event, handler)
Section titled “UITextInputNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed), submitted (Enter was pressed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUITextInputNodeEvent|stringhandlerfun(value:any, source: UITextInputNode)
Returns integer id Connection id for disconnect
UITextInputNode:get_property(path)
Section titled “UITextInputNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUITextInputNodeProperty|string
Returns any
UITextInputNode:set_property(path, value, y)
Section titled “UITextInputNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUITextInputNodeProperty|stringvalueanyy?number
UIDropdownNode
Section titled “UIDropdownNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
selectedIndex |
integer |
Index of the selected item (-1 = none). |
defaultIndex |
integer |
Index restored by reset. |
labelWidth |
number |
Width reserved for the label (px); 0 = none. |
isOpen |
boolean |
List open now. |
UIDropdownNode:connect(event, handler)
Section titled “UIDropdownNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUIDropdownNodeEvent|stringhandlerfun(value:any, source: UIDropdownNode)
Returns integer id Connection id for disconnect
UIDropdownNode:get_property(path)
Section titled “UIDropdownNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIDropdownNodeProperty|string
Returns any
UIDropdownNode:set_property(path, value, y)
Section titled “UIDropdownNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIDropdownNodeProperty|stringvalueanyy?number
UIRadioGroupNode
Section titled “UIRadioGroupNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
labelWidth |
number |
Width reserved for the label (px); 0 = none. |
selectedIndex |
integer |
Index of the selected item (-1 = none). |
defaultIndex |
integer |
Index restored by reset. |
horizontal |
boolean |
Options in a row (else a column). |
UIRadioGroupNode:connect(event, handler)
Section titled “UIRadioGroupNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUIRadioGroupNodeEvent|stringhandlerfun(value:any, source: UIRadioGroupNode)
Returns integer id Connection id for disconnect
UIRadioGroupNode:get_property(path)
Section titled “UIRadioGroupNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIRadioGroupNodeProperty|string
Returns any
UIRadioGroupNode:set_property(path, value, y)
Section titled “UIRadioGroupNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIRadioGroupNodeProperty|stringvalueanyy?number
UIToggleSwitchNode
Section titled “UIToggleSwitchNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
active |
boolean |
Switched on. |
UIToggleSwitchNode:get_property(path)
Section titled “UIToggleSwitchNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIToggleSwitchNodeProperty|string
Returns any
UIToggleSwitchNode:set_property(path, value, y)
Section titled “UIToggleSwitchNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIToggleSwitchNodeProperty|stringvalueanyy?number
UIKnobNode
Section titled “UIKnobNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
value |
number |
Current value (between min and max). |
minValue |
number |
Lowest value. |
maxValue |
number |
Highest value. |
defaultValue |
number |
Value restored by reset (double-click). |
UIKnobNode:connect(event, handler)
Section titled “UIKnobNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUIKnobNodeEvent|stringhandlerfun(value:any, source: UIKnobNode)
Returns integer id Connection id for disconnect
UIKnobNode:get_property(path)
Section titled “UIKnobNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIKnobNodeProperty|string
Returns any
UIKnobNode:set_property(path, value, y)
Section titled “UIKnobNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIKnobNodeProperty|stringvalueanyy?number
UINotchedSliderNode
Section titled “UINotchedSliderNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
value |
number |
Current value. |
minValue |
number |
Lowest value. |
maxValue |
number |
Highest value. |
numNotches |
integer |
Number of notch marks. |
snapToNotches |
boolean |
Snap the value to the notches. |
orientation |
"Horizontal"|"Vertical" |
Horizontal or vertical. |
UINotchedSliderNode:connect(event, handler)
Section titled “UINotchedSliderNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUINotchedSliderNodeEvent|stringhandlerfun(value:any, source: UINotchedSliderNode)
Returns integer id Connection id for disconnect
UINotchedSliderNode:get_property(path)
Section titled “UINotchedSliderNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUINotchedSliderNodeProperty|string
Returns any
UINotchedSliderNode:set_property(path, value, y)
Section titled “UINotchedSliderNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUINotchedSliderNodeProperty|stringvalueanyy?number
UIVolumeFaderNode
Section titled “UIVolumeFaderNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
valueDb |
number |
Level (dB). |
minDb |
number |
Bottom of the fader (dB). |
maxDb |
number |
Top of the fader (dB). |
defaultDb |
number |
Level restored by reset (dB). |
UIVolumeFaderNode:connect(event, handler)
Section titled “UIVolumeFaderNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUIVolumeFaderNodeEvent|stringhandlerfun(value:any, source: UIVolumeFaderNode)
Returns integer id Connection id for disconnect
UIVolumeFaderNode:get_property(path)
Section titled “UIVolumeFaderNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIVolumeFaderNodeProperty|string
Returns any
UIVolumeFaderNode:set_property(path, value, y)
Section titled “UIVolumeFaderNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIVolumeFaderNodeProperty|stringvalueanyy?number
UIVolumeMeterNode
Section titled “UIVolumeMeterNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Caption shown next to the control. |
levelL |
number |
Left channel level (dB). |
levelR |
number |
Right channel level (dB). |
minDb |
number |
Bottom of the meter (dB). |
maxDb |
number |
Top of the meter (dB). |
orientation |
"Vertical"|"Horizontal" |
Horizontal or vertical. |
UIVolumeMeterNode:get_property(path)
Section titled “UIVolumeMeterNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIVolumeMeterNodeProperty|string
Returns any
UIVolumeMeterNode:set_property(path, value, y)
Section titled “UIVolumeMeterNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIVolumeMeterNodeProperty|stringvalueanyy?number
UISeparatorNode
Section titled “UISeparatorNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
label |
string |
Text in the middle of the line (“” = a plain line). |
lineColor |
number[] |
Colour of the line. |
UISeparatorNode:get_property(path)
Section titled “UISeparatorNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUISeparatorNodeProperty|string
Returns any
UISeparatorNode:set_property(path, value, y)
Section titled “UISeparatorNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUISeparatorNodeProperty|stringvalueanyy?number
UIXYPlotNode
Section titled “UIXYPlotNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
xMin |
number |
Left end of the X axis. |
xMax |
number |
Right end of the X axis. |
yMin |
number |
Bottom of the Y axis. |
yMax |
number |
Top of the Y axis. |
autoScaleX |
boolean |
Fit the X axis to the data. |
autoScaleY |
boolean |
Fit the Y axis to the data. |
showGrid |
boolean |
Draw grid lines. |
showPoints |
boolean |
Mark each data point. |
showCrosshair |
boolean |
Crosshair with the value under the mouse. |
lineColor |
number[] |
Colour of the line. |
secondaryLineColor |
number[] |
Colour of the second series. |
gridColor |
number[] |
Grid line colour. |
UIXYPlotNode:get_property(path)
Section titled “UIXYPlotNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIXYPlotNodeProperty|string
Returns any
UIXYPlotNode:set_property(path, value, y)
Section titled “UIXYPlotNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIXYPlotNodeProperty|stringvalueanyy?number
UIListViewNode
Section titled “UIListViewNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
selectedIndex |
integer |
Index of the selected item (-1 = none). |
itemHeight |
number |
Height of each row (px). |
UIListViewNode:get_property(path)
Section titled “UIListViewNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIListViewNodeProperty|string
Returns any
UIListViewNode:set_property(path, value, y)
Section titled “UIListViewNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIListViewNodeProperty|stringvalueanyy?number
UITreeViewNode
Section titled “UITreeViewNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
selectedId |
integer |
Id of the selected item (-1 = none). |
itemHeight |
number |
Height of each row (px). |
UITreeViewNode:get_property(path)
Section titled “UITreeViewNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUITreeViewNodeProperty|string
Returns any
UITreeViewNode:set_property(path, value, y)
Section titled “UITreeViewNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUITreeViewNodeProperty|stringvalueanyy?number
UIUnorderedListNode
Section titled “UIUnorderedListNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
selectedIndex |
integer |
Index of the selected item (-1 = none). |
defaultBullet |
"Disc"|"Circle"|"Square"|"Dash"|"Arrow" |
Bullet style for items without their own. |
itemHeight |
number |
Height of each row (px). |
UIUnorderedListNode:connect(event, handler)
Section titled “UIUnorderedListNode:connect(event, handler)”Connects a handler to one of this node’s events: selected (The selection changed); the tree events; custom ones.
self.node:connect("selected", function(value, source) Log.info("selected") end)eventUIUnorderedListNodeEvent|stringhandlerfun(value:any, source: UIUnorderedListNode)
Returns integer id Connection id for disconnect
UIUnorderedListNode:get_property(path)
Section titled “UIUnorderedListNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIUnorderedListNodeProperty|string
Returns any
UIUnorderedListNode:set_property(path, value, y)
Section titled “UIUnorderedListNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIUnorderedListNodeProperty|stringvalueanyy?number
UIOrderedListNode
Section titled “UIOrderedListNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
selectedIndex |
integer |
Index of the selected item (-1 = none). |
numbering |
"Decimal"|"AlphaLower"|"AlphaUpper"|"RomanLower"|"RomanUpper" |
Numbering style (1, a, i…). |
startNumber |
integer |
Number of the first item. |
itemHeight |
number |
Height of each row (px). |
UIOrderedListNode:connect(event, handler)
Section titled “UIOrderedListNode:connect(event, handler)”Connects a handler to one of this node’s events: selected (The selection changed); the tree events; custom ones.
self.node:connect("selected", function(value, source) Log.info("selected") end)eventUIOrderedListNodeEvent|stringhandlerfun(value:any, source: UIOrderedListNode)
Returns integer id Connection id for disconnect
UIOrderedListNode:get_property(path)
Section titled “UIOrderedListNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIOrderedListNodeProperty|string
Returns any
UIOrderedListNode:set_property(path, value, y)
Section titled “UIOrderedListNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIOrderedListNodeProperty|stringvalueanyy?number
UITableNode
Section titled “UITableNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
selectedRow |
integer |
Index of the selected row. |
sortColumn |
integer |
Column the rows are sorted by. |
sortAscending |
boolean |
Sort ascending (else descending). |
headerHeight |
number |
Height of the header (px). |
rowHeight |
number |
Height of each row (px). |
UITableNode:connect(event, handler)
Section titled “UITableNode:connect(event, handler)”Connects a handler to one of this node’s events: row_selected (A table row was selected), sorted (The table was sorted); the tree events; custom ones.
self.node:connect("row_selected", function(value, source) Log.info("row_selected") end)eventUITableNodeEvent|stringhandlerfun(value:any, source: UITableNode)
Returns integer id Connection id for disconnect
UITableNode:get_property(path)
Section titled “UITableNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUITableNodeProperty|string
Returns any
UITableNode:set_property(path, value, y)
Section titled “UITableNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUITableNodeProperty|stringvalueanyy?number
UIIconNode
Section titled “UIIconNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
icon |
"None"|"Digit0"|"Digit1"|"Digit2"|"Digit3"|"Digit4"|"Digit5"|"Digit6"|"Digit7"|"Digit8"|"Digit9"|"A"|"AddressBook"|"AddressCard"|"AlignCenter"|"AlignJustify"|"AlignLeft"|"AlignRight"|"Anchor"|"AnchorCircleCheck"|"AnchorCircleExclamation"|"AnchorCircleXmark"|"AnchorLock"|"AngleDown"|"AngleLeft"|"AngleRight"|"AngleUp"|"AnglesDown"|"AnglesLeft"|"AnglesRight"|"AnglesUp"|"Ankh"|"AppleWhole"|"Archway"|"ArrowDown"|"ArrowDown19"|"ArrowDown91"|"ArrowDownAZ"|"ArrowDownLong"|"ArrowDownShortWide"|"ArrowDownUpAcrossLine"|"ArrowDownUpLock"|"ArrowDownWideShort"|"ArrowDownZA"|"ArrowLeft"|"ArrowLeftLong"|"ArrowPointer"|"ArrowRight"|"ArrowRightArrowLeft"|"ArrowRightFromBracket"|"ArrowRightLong"|"ArrowRightToBracket"|"ArrowRightToCity"|"ArrowRotateLeft"|"ArrowRotateRight"|"ArrowTrendDown"|"ArrowTrendUp"|"ArrowTurnDown"|"ArrowTurnUp"|"ArrowUp"|"ArrowUp19"|"ArrowUp91"|"ArrowUpAZ"|"ArrowUpFromBracket"|"ArrowUpFromGroundWater"|"ArrowUpFromWaterPump"|"ArrowUpLong"|"ArrowUpRightDots"|"ArrowUpRightFromSquare"|"ArrowUpShortWide"|"ArrowUpWideShort"|"ArrowUpZA"|"ArrowsDownToLine"|"ArrowsDownToPeople"|"ArrowsLeftRight"|"ArrowsLeftRightToLine"|"ArrowsRotate"|"ArrowsSpin"|"ArrowsSplitUpAndLeft"|"ArrowsToCircle"|"ArrowsToDot"|"ArrowsToEye"|"ArrowsTurnRight"|"ArrowsTurnToDots"|"ArrowsUpDown"|"ArrowsUpDownLeftRight"|"ArrowsUpToLine"|"Asterisk"|"At"|"Atom"|"AudioDescription"|"AustralSign"|"Award"|"B"|"Baby"|"BabyCarriage"|"Backward"|"BackwardFast"|"BackwardStep"|"Bacon"|"Bacteria"|"Bacterium"|"BagShopping"|"Bahai"|"BahtSign"|"Ban"|"BanSmoking"|"Bandage"|"BangladeshiTakaSign"|"Barcode"|"Bars"|"BarsProgress"|"BarsStaggered"|"Baseball"|"BaseballBatBall"|"BasketShopping"|"Basketball"|"Bath"|"BatteryEmpty"|"BatteryFull"|"BatteryHalf"|"BatteryQuarter"|"BatteryThreeQuarters"|"Bed"|"BedPulse"|"BeerMugEmpty"|"Bell"|"BellConcierge"|"BellSlash"|"BezierCurve"|"Bicycle"|"Binoculars"|"Biohazard"|"BitcoinSign"|"Blender"|"BlenderPhone"|"Blog"|"Bold"|"Bolt"|"BoltLightning"|"Bomb"|"Bone"|"Bong"|"Book"|"BookAtlas"|"BookBible"|"BookBookmark"|"BookJournalWhills"|"BookMedical"|"BookOpen"|"BookOpenReader"|"BookQuran"|"BookSkull"|"BookTanakh"|"Bookmark"|"BorderAll"|"BorderNone"|"BorderTopLeft"|"BoreHole"|"BottleDroplet"|"BottleWater"|"BowlFood"|"BowlRice"|"BowlingBall"|"Box"|"BoxArchive"|"BoxOpen"|"BoxTissue"|"BoxesPacking"|"BoxesStacked"|"Braille"|"Brain"|"BrazilianRealSign"|"BreadSlice"|"Bridge"|"BridgeCircleCheck"|"BridgeCircleExclamation"|"BridgeCircleXmark"|"BridgeLock"|"BridgeWater"|"Briefcase"|"BriefcaseMedical"|"Broom"|"BroomBall"|"Brush"|"Bucket"|"Bug"|"BugSlash"|"Bugs"|"Building"|"BuildingCircleArrowRight"|"BuildingCircleCheck"|"BuildingCircleExclamation"|"BuildingCircleXmark"|"BuildingColumns"|"BuildingFlag"|"BuildingLock"|"BuildingNgo"|"BuildingShield"|"BuildingUn"|"BuildingUser"|"BuildingWheat"|"Bullhorn"|"Bullseye"|"Burger"|"Burst"|"Bus"|"BusSimple"|"BusinessTime"|"C"|"CableCar"|"CakeCandles"|"Calculator"|"Calendar"|"CalendarCheck"|"CalendarDay"|"CalendarDays"|"CalendarMinus"|"CalendarPlus"|"CalendarWeek"|"CalendarXmark"|"Camera"|"CameraRetro"|"CameraRotate"|"Campground"|"CandyCane"|"Cannabis"|"Capsules"|"Car"|"CarBattery"|"CarBurst"|"CarOn"|"CarRear"|"CarSide"|"CarTunnel"|"Caravan"|"CaretDown"|"CaretLeft"|"CaretRight"|"CaretUp"|"Carrot"|"CartArrowDown"|"CartFlatbed"|"CartFlatbedSuitcase"|"CartPlus"|"CartShopping"|"CashRegister"|"Cat"|"CediSign"|"CentSign"|"Certificate"|"Chair"|"Chalkboard"|"ChalkboardUser"|"ChampagneGlasses"|"ChargingStation"|"ChartArea"|"ChartBar"|"ChartColumn"|"ChartDiagram"|"ChartGantt"|"ChartLine"|"ChartPie"|"ChartSimple"|"Check"|"CheckDouble"|"CheckToSlot"|"Cheese"|"Chess"|"ChessBishop"|"ChessBoard"|"ChessKing"|"ChessKnight"|"ChessPawn"|"ChessQueen"|"ChessRook"|"ChevronDown"|"ChevronLeft"|"ChevronRight"|"ChevronUp"|"Child"|"ChildCombatant"|"ChildDress"|"ChildReaching"|"Children"|"Church"|"Circle"|"CircleArrowDown"|"CircleArrowLeft"|"CircleArrowRight"|"CircleArrowUp"|"CircleCheck"|"CircleChevronDown"|"CircleChevronLeft"|"CircleChevronRight"|"CircleChevronUp"|"CircleDollarToSlot"|"CircleDot"|"CircleDown"|"CircleExclamation"|"CircleH"|"CircleHalfStroke"|"CircleInfo"|"CircleLeft"|"CircleMinus"|"CircleNodes"|"CircleNotch"|"CirclePause"|"CirclePlay"|"CirclePlus"|"CircleQuestion"|"CircleRadiation"|"CircleRight"|"CircleStop"|"CircleUp"|"CircleUser"|"CircleXmark"|"City"|"Clapperboard"|"Clipboard"|"ClipboardCheck"|"ClipboardList"|"ClipboardQuestion"|"ClipboardUser"|"Clock"|"ClockRotateLeft"|"Clone"|"ClosedCaptioning"|"Cloud"|"CloudArrowDown"|"CloudArrowUp"|"CloudBolt"|"CloudMeatball"|"CloudMoon"|"CloudMoonRain"|"CloudRain"|"CloudShowersHeavy"|"CloudShowersWater"|"CloudSun"|"CloudSunRain"|"Clover"|"Code"|"CodeBranch"|"CodeCommit"|"CodeCompare"|"CodeFork"|"CodeMerge"|"CodePullRequest"|"Coins"|"ColonSign"|"Comment"|"CommentDollar"|"CommentDots"|"CommentMedical"|"CommentNodes"|"CommentSlash"|"CommentSms"|"Comments"|"CommentsDollar"|"CompactDisc"|"Compass"|"CompassDrafting"|"Compress"|"Computer"|"ComputerMouse"|"Cookie"|"CookieBite"|"Copy"|"Copyright"|"Couch"|"Cow"|"CreditCard"|"Crop"|"CropSimple"|"Cross"|"Crosshairs"|"Crow"|"Crown"|"Crutch"|"CruzeiroSign"|"Cube"|"Cubes"|"CubesStacked"|"D"|"Database"|"DeleteLeft"|"Democrat"|"Desktop"|"Dharmachakra"|"DiagramNext"|"DiagramPredecessor"|"DiagramProject"|"DiagramSuccessor"|"Diamond"|"DiamondTurnRight"|"Dice"|"DiceD20"|"DiceD6"|"DiceFive"|"DiceFour"|"DiceOne"|"DiceSix"|"DiceThree"|"DiceTwo"|"Disease"|"Display"|"Divide"|"Dna"|"Dog"|"DollarSign"|"Dolly"|"DongSign"|"DoorClosed"|"DoorOpen"|"Dove"|"DownLeftAndUpRightToCenter"|"DownLong"|"Download"|"Dragon"|"DrawPolygon"|"Droplet"|"DropletSlash"|"Drum"|"DrumSteelpan"|"DrumstickBite"|"Dumbbell"|"Dumpster"|"DumpsterFire"|"Dungeon"|"E"|"EarDeaf"|"EarListen"|"EarthAfrica"|"EarthAmericas"|"EarthAsia"|"EarthEurope"|"EarthOceania"|"Egg"|"Eject"|"Elevator"|"Ellipsis"|"EllipsisVertical"|"Envelope"|"EnvelopeCircleCheck"|"EnvelopeOpen"|"EnvelopeOpenText"|"EnvelopesBulk"|"Equals"|"Eraser"|"Ethernet"|"EuroSign"|"Exclamation"|"Expand"|"Explosion"|"Eye"|"EyeDropper"|"EyeLowVision"|"EyeSlash"|"F"|"FaceAngry"|"FaceDizzy"|"FaceFlushed"|"FaceFrown"|"FaceFrownOpen"|"FaceGrimace"|"FaceGrin"|"FaceGrinBeam"|"FaceGrinBeamSweat"|"FaceGrinHearts"|"FaceGrinSquint"|"FaceGrinSquintTears"|"FaceGrinStars"|"FaceGrinTears"|"FaceGrinTongue"|"FaceGrinTongueSquint"|"FaceGrinTongueWink"|"FaceGrinWide"|"FaceGrinWink"|"FaceKiss"|"FaceKissBeam"|"FaceKissWinkHeart"|"FaceLaugh"|"FaceLaughBeam"|"FaceLaughSquint"|"FaceLaughWink"|"FaceMeh"|"FaceMehBlank"|"FaceRollingEyes"|"FaceSadCry"|"FaceSadTear"|"FaceSmile"|"FaceSmileBeam"|"FaceSmileWink"|"FaceSurprise"|"FaceTired"|"Fan"|"Faucet"|"FaucetDrip"|"Fax"|"Feather"|"FeatherPointed"|"Ferry"|"File"|"FileArrowDown"|"FileArrowUp"|"FileAudio"|"FileCircleCheck"|"FileCircleExclamation"|"FileCircleMinus"|"FileCirclePlus"|"FileCircleQuestion"|"FileCircleXmark"|"FileCode"|"FileContract"|"FileCsv"|"FileExcel"|"FileExport"|"FileFragment"|"FileHalfDashed"|"FileImage"|"FileImport"|"FileInvoice"|"FileInvoiceDollar"|"FileLines"|"FileMedical"|"FilePdf"|"FilePen"|"FilePowerpoint"|"FilePrescription"|"FileShield"|"FileSignature"|"FileVideo"|"FileWaveform"|"FileWord"|"FileZipper"|"Fill"|"FillDrip"|"Film"|"Filter"|"FilterCircleDollar"|"FilterCircleXmark"|"Fingerprint"|"Fire"|"FireBurner"|"FireExtinguisher"|"FireFlameCurved"|"FireFlameSimple"|"Fish"|"FishFins"|"Flag"|"FlagCheckered"|"FlagUsa"|"Flask"|"FlaskVial"|"FloppyDisk"|"FlorinSign"|"Folder"|"FolderClosed"|"FolderMinus"|"FolderOpen"|"FolderPlus"|"FolderTree"|"Font"|"FontAwesome"|"Football"|"Forward"|"ForwardFast"|"ForwardStep"|"FrancSign"|"Frog"|"Futbol"|"G"|"Gamepad"|"GasPump"|"Gauge"|"GaugeHigh"|"GaugeSimple"|"GaugeSimpleHigh"|"Gavel"|"Gear"|"Gears"|"Gem"|"Genderless"|"Ghost"|"Gift"|"Gifts"|"GlassWater"|"GlassWaterDroplet"|"Glasses"|"Globe"|"GolfBallTee"|"Gopuram"|"GraduationCap"|"GreaterThan"|"GreaterThanEqual"|"Grip"|"GripLines"|"GripLinesVertical"|"GripVertical"|"GroupArrowsRotate"|"GuaraniSign"|"Guitar"|"Gun"|"H"|"Hammer"|"Hamsa"|"Hand"|"HandBackFist"|"HandDots"|"HandFist"|"HandHolding"|"HandHoldingDollar"|"HandHoldingDroplet"|"HandHoldingHand"|"HandHoldingHeart"|"HandHoldingMedical"|"HandLizard"|"HandMiddleFinger"|"HandPeace"|"HandPointDown"|"HandPointLeft"|"HandPointRight"|"HandPointUp"|"HandPointer"|"HandScissors"|"HandSparkles"|"HandSpock"|"Handcuffs"|"Hands"|"HandsAslInterpreting"|"HandsBound"|"HandsBubbles"|"HandsClapping"|"HandsHolding"|"HandsHoldingChild"|"HandsHoldingCircle"|"HandsPraying"|"Handshake"|"HandshakeAngle"|"HandshakeSimple"|"HandshakeSimpleSlash"|"HandshakeSlash"|"Hanukiah"|"HardDrive"|"Hashtag"|"HatCowboy"|"HatCowboySide"|"HatWizard"|"HeadSideCough"|"HeadSideCoughSlash"|"HeadSideMask"|"HeadSideVirus"|"Heading"|"Headphones"|"HeadphonesSimple"|"Headset"|"Heart"|"HeartCircleBolt"|"HeartCircleCheck"|"HeartCircleExclamation"|"HeartCircleMinus"|"HeartCirclePlus"|"HeartCircleXmark"|"HeartCrack"|"HeartPulse"|"Helicopter"|"HelicopterSymbol"|"HelmetSafety"|"HelmetUn"|"HexagonNodes"|"HexagonNodesBolt"|"Highlighter"|"HillAvalanche"|"HillRockslide"|"Hippo"|"HockeyPuck"|"HollyBerry"|"Horse"|"HorseHead"|"Hospital"|"HospitalUser"|"HotTubPerson"|"Hotdog"|"Hotel"|"Hourglass"|"HourglassEnd"|"HourglassHalf"|"HourglassStart"|"House"|"HouseChimney"|"HouseChimneyCrack"|"HouseChimneyMedical"|"HouseChimneyUser"|"HouseChimneyWindow"|"HouseCircleCheck"|"HouseCircleExclamation"|"HouseCircleXmark"|"HouseCrack"|"HouseFire"|"HouseFlag"|"HouseFloodWater"|"HouseFloodWaterCircleArrowRight"|"HouseLaptop"|"HouseLock"|"HouseMedical"|"HouseMedicalCircleCheck"|"HouseMedicalCircleExclamation"|"HouseMedicalCircleXmark"|"HouseMedicalFlag"|"HouseSignal"|"HouseTsunami"|"HouseUser"|"HryvniaSign"|"Hurricane"|"I"|"ICursor"|"IceCream"|"Icicles"|"Icons"|"IdBadge"|"IdCard"|"IdCardClip"|"Igloo"|"Image"|"ImagePortrait"|"Images"|"Inbox"|"Indent"|"IndianRupeeSign"|"Industry"|"Infinity"|"Info"|"Italic"|"J"|"Jar"|"JarWheat"|"Jedi"|"JetFighter"|"JetFighterUp"|"Joint"|"JugDetergent"|"K"|"Kaaba"|"Key"|"Keyboard"|"Khanda"|"KipSign"|"KitMedical"|"KitchenSet"|"KiwiBird"|"L"|"LandMineOn"|"Landmark"|"LandmarkDome"|"LandmarkFlag"|"Language"|"Laptop"|"LaptopCode"|"LaptopFile"|"LaptopMedical"|"LariSign"|"LayerGroup"|"Leaf"|"LeftLong"|"LeftRight"|"Lemon"|"LessThan"|"LessThanEqual"|"LifeRing"|"Lightbulb"|"LinesLeaning"|"Link"|"LinkSlash"|"LiraSign"|"List"|"ListCheck"|"ListOl"|"ListUl"|"LitecoinSign"|"LocationArrow"|"LocationCrosshairs"|"LocationDot"|"LocationPin"|"LocationPinLock"|"Lock"|"LockOpen"|"Locust"|"Lungs"|"LungsVirus"|"M"|"Magnet"|"MagnifyingGlass"|"MagnifyingGlassArrowRight"|"MagnifyingGlassChart"|"MagnifyingGlassDollar"|"MagnifyingGlassLocation"|"MagnifyingGlassMinus"|"MagnifyingGlassPlus"|"ManatSign"|"Map"|"MapLocation"|"MapLocationDot"|"MapPin"|"Marker"|"Mars"|"MarsAndVenus"|"MarsAndVenusBurst"|"MarsDouble"|"MarsStroke"|"MarsStrokeRight"|"MarsStrokeUp"|"MartiniGlass"|"MartiniGlassCitrus"|"MartiniGlassEmpty"|"Mask"|"MaskFace"|"MaskVentilator"|"MasksTheater"|"MattressPillow"|"Maximize"|"Medal"|"Memory"|"Menorah"|"Mercury"|"Message"|"Meteor"|"Microchip"|"Microphone"|"MicrophoneLines"|"MicrophoneLinesSlash"|"MicrophoneSlash"|"Microscope"|"MillSign"|"Minimize"|"Minus"|"Mitten"|"Mobile"|"MobileButton"|"MobileRetro"|"MobileScreen"|"MobileScreenButton"|"MoneyBill"|"MoneyBill1"|"MoneyBill1Wave"|"MoneyBillTransfer"|"MoneyBillTrendUp"|"MoneyBillWave"|"MoneyBillWheat"|"MoneyBills"|"MoneyCheck"|"MoneyCheckDollar"|"Monument"|"Moon"|"MortarPestle"|"Mosque"|"Mosquito"|"MosquitoNet"|"Motorcycle"|"Mound"|"Mountain"|"MountainCity"|"MountainSun"|"MugHot"|"MugSaucer"|"Music"|"N"|"NairaSign"|"NetworkWired"|"Neuter"|"Newspaper"|"NotEqual"|"Notdef"|"NoteSticky"|"NotesMedical"|"O"|"ObjectGroup"|"ObjectUngroup"|"OilCan"|"OilWell"|"Om"|"Otter"|"Outdent"|"P"|"Pager"|"PaintRoller"|"Paintbrush"|"Palette"|"Pallet"|"Panorama"|"PaperPlane"|"Paperclip"|"ParachuteBox"|"Paragraph"|"Passport"|"Paste"|"Pause"|"Paw"|"Peace"|"Pen"|"PenClip"|"PenFancy"|"PenNib"|"PenRuler"|"PenToSquare"|"Pencil"|"PeopleArrows"|"PeopleCarryBox"|"PeopleGroup"|"PeopleLine"|"PeoplePulling"|"PeopleRobbery"|"PeopleRoof"|"PepperHot"|"Percent"|"Person"|"PersonArrowDownToLine"|"PersonArrowUpFromLine"|"PersonBiking"|"PersonBooth"|"PersonBreastfeeding"|"PersonBurst"|"PersonCane"|"PersonChalkboard"|"PersonCircleCheck"|"PersonCircleExclamation"|"PersonCircleMinus"|"PersonCirclePlus"|"PersonCircleQuestion"|"PersonCircleXmark"|"PersonDigging"|"PersonDotsFromLine"|"PersonDress"|"PersonDressBurst"|"PersonDrowning"|"PersonFalling"|"PersonFallingBurst"|"PersonHalfDress"|"PersonHarassing"|"PersonHiking"|"PersonMilitaryPointing"|"PersonMilitaryRifle"|"PersonMilitaryToPerson"|"PersonPraying"|"PersonPregnant"|"PersonRays"|"PersonRifle"|"PersonRunning"|"PersonShelter"|"PersonSkating"|"PersonSkiing"|"PersonSkiingNordic"|"PersonSnowboarding"|"PersonSwimming"|"PersonThroughWindow"|"PersonWalking"|"PersonWalkingArrowLoopLeft"|"PersonWalkingArrowRight"|"PersonWalkingDashedLineArrowRight"|"PersonWalkingLuggage"|"PersonWalkingWithCane"|"PesetaSign"|"PesoSign"|"Phone"|"PhoneFlip"|"PhoneSlash"|"PhoneVolume"|"PhotoFilm"|"PiggyBank"|"Pills"|"PizzaSlice"|"PlaceOfWorship"|"Plane"|"PlaneArrival"|"PlaneCircleCheck"|"PlaneCircleExclamation"|"PlaneCircleXmark"|"PlaneDeparture"|"PlaneLock"|"PlaneSlash"|"PlaneUp"|"PlantWilt"|"PlateWheat"|"Play"|"Plug"|"PlugCircleBolt"|"PlugCircleCheck"|"PlugCircleExclamation"|"PlugCircleMinus"|"PlugCirclePlus"|"PlugCircleXmark"|"Plus"|"PlusMinus"|"Podcast"|"Poo"|"PooStorm"|"Poop"|"PowerOff"|"Prescription"|"PrescriptionBottle"|"PrescriptionBottleMedical"|"Print"|"PumpMedical"|"PumpSoap"|"PuzzlePiece"|"Q"|"Qrcode"|"Question"|"QuoteLeft"|"QuoteRight"|"R"|"Radiation"|"Radio"|"Rainbow"|"RankingStar"|"Receipt"|"RecordVinyl"|"RectangleAd"|"RectangleList"|"RectangleXmark"|"Recycle"|"Registered"|"Repeat"|"Reply"|"ReplyAll"|"Republican"|"Restroom"|"Retweet"|"Ribbon"|"RightFromBracket"|"RightLeft"|"RightLong"|"RightToBracket"|"Ring"|"Road"|"RoadBarrier"|"RoadBridge"|"RoadCircleCheck"|"RoadCircleExclamation"|"RoadCircleXmark"|"RoadLock"|"RoadSpikes"|"Robot"|"Rocket"|"Rotate"|"RotateLeft"|"RotateRight"|"Route"|"Rss"|"RubleSign"|"Rug"|"Ruler"|"RulerCombined"|"RulerHorizontal"|"RulerVertical"|"RupeeSign"|"RupiahSign"|"S"|"SackDollar"|"SackXmark"|"Sailboat"|"Satellite"|"SatelliteDish"|"ScaleBalanced"|"ScaleUnbalanced"|"ScaleUnbalancedFlip"|"School"|"SchoolCircleCheck"|"SchoolCircleExclamation"|"SchoolCircleXmark"|"SchoolFlag"|"SchoolLock"|"Scissors"|"Screwdriver"|"ScrewdriverWrench"|"Scroll"|"ScrollTorah"|"SdCard"|"Section"|"Seedling"|"Server"|"Shapes"|"Share"|"ShareFromSquare"|"ShareNodes"|"SheetPlastic"|"ShekelSign"|"Shield"|"ShieldCat"|"ShieldDog"|"ShieldHalved"|"ShieldHeart"|"ShieldVirus"|"Ship"|"Shirt"|"ShoePrints"|"Shop"|"ShopLock"|"ShopSlash"|"Shower"|"Shrimp"|"Shuffle"|"ShuttleSpace"|"SignHanging"|"Signal"|"Signature"|"SignsPost"|"SimCard"|"Sink"|"Sitemap"|"Skull"|"SkullCrossbones"|"Slash"|"Sleigh"|"Sliders"|"Smog"|"Smoking"|"Snowflake"|"Snowman"|"Snowplow"|"Soap"|"Socks"|"SolarPanel"|"Sort"|"SortDown"|"SortUp"|"Spa"|"SpaghettiMonsterFlying"|"SpellCheck"|"Spider"|"Spinner"|"Splotch"|"Spoon"|"SprayCan"|"SprayCanSparkles"|"Square"|"SquareArrowUpRight"|"SquareBinary"|"SquareCaretDown"|"SquareCaretLeft"|"SquareCaretRight"|"SquareCaretUp"|"SquareCheck"|"SquareEnvelope"|"SquareFull"|"SquareH"|"SquareMinus"|"SquareNfi"|"SquareParking"|"SquarePen"|"SquarePersonConfined"|"SquarePhone"|"SquarePhoneFlip"|"SquarePlus"|"SquarePollHorizontal"|"SquarePollVertical"|"SquareRootVariable"|"SquareRss"|"SquareShareNodes"|"SquareUpRight"|"SquareVirus"|"SquareXmark"|"StaffSnake"|"Stairs"|"Stamp"|"Stapler"|"Star"|"StarAndCrescent"|"StarHalf"|"StarHalfStroke"|"StarOfDavid"|"StarOfLife"|"SterlingSign"|"Stethoscope"|"Stop"|"Stopwatch"|"Stopwatch20"|"Store"|"StoreSlash"|"StreetView"|"Strikethrough"|"Stroopwafel"|"Subscript"|"Suitcase"|"SuitcaseMedical"|"SuitcaseRolling"|"Sun"|"SunPlantWilt"|"Superscript"|"Swatchbook"|"Synagogue"|"Syringe"|"T"|"Table"|"TableCells"|"TableCellsColumnLock"|"TableCellsLarge"|"TableCellsRowLock"|"TableCellsRowUnlock"|"TableColumns"|"TableList"|"TableTennisPaddleBall"|"Tablet"|"TabletButton"|"TabletScreenButton"|"Tablets"|"TachographDigital"|"Tag"|"Tags"|"Tape"|"Tarp"|"TarpDroplet"|"Taxi"|"Teeth"|"TeethOpen"|"TemperatureArrowDown"|"TemperatureArrowUp"|"TemperatureEmpty"|"TemperatureFull"|"TemperatureHalf"|"TemperatureHigh"|"TemperatureLow"|"TemperatureQuarter"|"TemperatureThreeQuarters"|"TengeSign"|"Tent"|"TentArrowDownToLine"|"TentArrowLeftRight"|"TentArrowTurnLeft"|"TentArrowsDown"|"Tents"|"Terminal"|"TextHeight"|"TextSlash"|"TextWidth"|"Thermometer"|"ThumbsDown"|"ThumbsUp"|"Thumbtack"|"ThumbtackSlash"|"Ticket"|"TicketSimple"|"Timeline"|"ToggleOff"|"ToggleOn"|"Toilet"|"ToiletPaper"|"ToiletPaperSlash"|"ToiletPortable"|"ToiletsPortable"|"Toolbox"|"Tooth"|"ToriiGate"|"Tornado"|"TowerBroadcast"|"TowerCell"|"TowerObservation"|"Tractor"|"Trademark"|"TrafficLight"|"Trailer"|"Train"|"TrainSubway"|"TrainTram"|"Transgender"|"Trash"|"TrashArrowUp"|"TrashCan"|"TrashCanArrowUp"|"Tree"|"TreeCity"|"TriangleExclamation"|"Trophy"|"Trowel"|"TrowelBricks"|"Truck"|"TruckArrowRight"|"TruckDroplet"|"TruckFast"|"TruckField"|"TruckFieldUn"|"TruckFront"|"TruckMedical"|"TruckMonster"|"TruckMoving"|"TruckPickup"|"TruckPlane"|"TruckRampBox"|"Tty"|"TurkishLiraSign"|"TurnDown"|"TurnUp"|"Tv"|"U"|"Umbrella"|"UmbrellaBeach"|"Underline"|"UniversalAccess"|"Unlock"|"UnlockKeyhole"|"UpDown"|"UpDownLeftRight"|"UpLong"|"UpRightAndDownLeftFromCenter"|"UpRightFromSquare"|"Upload"|"User"|"UserAstronaut"|"UserCheck"|"UserClock"|"UserDoctor"|"UserGear"|"UserGraduate"|"UserGroup"|"UserInjured"|"UserLarge"|"UserLargeSlash"|"UserLock"|"UserMinus"|"UserNinja"|"UserNurse"|"UserPen"|"UserPlus"|"UserSecret"|"UserShield"|"UserSlash"|"UserTag"|"UserTie"|"UserXmark"|"Users"|"UsersBetweenLines"|"UsersGear"|"UsersLine"|"UsersRays"|"UsersRectangle"|"UsersSlash"|"UsersViewfinder"|"Utensils"|"V"|"VanShuttle"|"Vault"|"VectorSquare"|"Venus"|"VenusDouble"|"VenusMars"|"Vest"|"VestPatches"|"Vial"|"VialCircleCheck"|"VialVirus"|"Vials"|"Video"|"VideoSlash"|"Vihara"|"Virus"|"VirusCovid"|"VirusCovidSlash"|"VirusSlash"|"Viruses"|"Voicemail"|"Volcano"|"Volleyball"|"VolumeHigh"|"VolumeLow"|"VolumeOff"|"VolumeXmark"|"VrCardboard"|"W"|"WalkieTalkie"|"Wallet"|"WandMagic"|"WandMagicSparkles"|"WandSparkles"|"Warehouse"|"Water"|"WaterLadder"|"WaveSquare"|"WebAwesome"|"WeightHanging"|"WeightScale"|"WheatAwn"|"WheatAwnCircleExclamation"|"Wheelchair"|"WheelchairMove"|"WhiskeyGlass"|"Wifi"|"Wind"|"WindowMaximize"|"WindowMinimize"|"WindowRestore"|"WineBottle"|"WineGlass"|"WineGlassEmpty"|"WonSign"|"Worm"|"Wrench"|"X"|"XRay"|"Xmark"|"XmarksLines"|"Y"|"YenSign"|"YinYang"|"Z"|"Search"|"Save"|"Settings"|"Cog"|"Home"|"Edit"|"Close"|"Cancel"|"Refresh"|"Warning"|"CheckCircle"|"TimesCircle"|"VolumeMute"|"Cut"|"Undo"|"Redo"|"StepForward"|"StepBackward"|"Pin"|"ZoomIn"|"ZoomOut" |
Icon shown (Font Awesome). |
iconSize |
number |
Icon size (px). |
color |
number[] |
Icon colour. |
align |
"Left"|"Center"|"Right" |
Horizontal text alignment. |
UIIconNode:get_property(path)
Section titled “UIIconNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIIconNodeProperty|string
Returns any
UIIconNode:set_property(path, value, y)
Section titled “UIIconNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIIconNodeProperty|stringvalueanyy?number
UIToolbarNode
Section titled “UIToolbarNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
activeToggleId |
integer |
Id of the pressed toggle button. |
buttonSize |
Vec2 |
Size of each button (px). |
spacing |
number |
Gap between items (px). |
UIToolbarNode:connect(event, handler)
Section titled “UIToolbarNode:connect(event, handler)”Connects a handler to one of this node’s events: item_clicked (A toolbar item was clicked); the tree events; custom ones.
self.node:connect("item_clicked", function(value, source) Log.info("item_clicked") end)eventUIToolbarNodeEvent|stringhandlerfun(value:any, source: UIToolbarNode)
Returns integer id Connection id for disconnect
UIToolbarNode:get_property(path)
Section titled “UIToolbarNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIToolbarNodeProperty|string
Returns any
UIToolbarNode:set_property(path, value, y)
Section titled “UIToolbarNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIToolbarNodeProperty|stringvalueanyy?number
UITabContainerNode
Section titled “UITabContainerNode”Inherits Node
| Field | Type | |
|---|---|---|
position |
Vec2 |
Position relative to the parent, in pixels (+y is down). |
scale |
Vec2 |
Size multiplier relative to the parent (1, 1 = as is; negative flips). |
rotation |
number |
Rotation relative to the parent, in degrees (clockwise). |
layer |
"Layer1"|"Layer2"|"Layer3"|"Layer4"|"Layer5"|"Layer6"|"Layer7"|"Layer8" |
Drawing layer: higher layers draw over lower ones (Layer8 is for UI). |
zIndex |
integer |
Draw order within the layer, added to the parent’s: higher draws on top (-10, 0, 10…)… |
ySort |
boolean |
Draw the children by their Y position (lower on screen = in front), each with its child… |
ySortOffset |
number |
Added to this node’s Y when its parent Y-sorts: move the sorting line to the feet (e.g…. |
pauseMode |
"Inherit"|"Pausable"|"Always" |
Inherit the parent’s pausing, Pausable (stops when paused) or Always (keeps running, e…. |
paused |
boolean |
Pauses this node and its children (except Always ones) while the game runs. |
enabled |
boolean |
Disabled nodes (and their children) neither update nor draw. |
size |
Vec2 |
Width and height (px). |
title |
string |
Header text. |
direction |
"Vertical"|"Horizontal"|"Grid" |
Children are laid out in a column, a row or a grid. |
alignment |
"Start"|"Center"|"End"|"Stretch" |
Where children sit across the layout direction. |
spacing |
number |
Gap between items (px). |
paddingTop |
number |
Space above the children (px). |
paddingBottom |
number |
Space below the children (px). |
paddingLeft |
number |
Space left of the children (px). |
paddingRight |
number |
Space right of the children (px). |
columns |
integer |
Grid layout: columns per row. |
autoSizeHeight |
boolean |
Grow to fit the children. |
drawBackground |
boolean |
Fill the background. |
drawBorder |
boolean |
Draw a border. |
showHeader |
boolean |
Draw a header with the title. |
headerHeight |
number |
Height of the header (px). |
backgroundColor |
number[] |
Fill colour of the background. |
headerColor |
number[] |
Header fill colour. |
borderColor |
number[] |
Colour of the border. |
titleColor |
number[] |
Title text colour. |
tabDirection |
"Horizontal"|"Vertical" |
Tabs along the top or the side. |
activeTab |
integer |
Index of the shown tab (child). |
tabSize |
number |
Tab height (or width when vertical; px). |
UITabContainerNode:get_property(path)
Section titled “UITabContainerNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUITabContainerNodeProperty|string
Returns any
UITabContainerNode:set_property(path, value, y)
Section titled “UITabContainerNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUITabContainerNodeProperty|stringvalueanyy?number
