--- generated_by: gdlink-build generated_at: 2026-06-23T12:34:28Z do_not_edit: true title: Sprite brick_type: executor tier: Basic generated: true --- # Sprite **Category:** Executor **Tier:** Basic ## Purpose Controls 2D sprite properties including frame animation, texture swapping, and sprite sheet manipulation. ## Visual Reference ```{raw} html
As added to your scene
Sprite brick as it appears in the GDLink editor
``` ## When To Use - Frame-by-frame animation control - Character state sprites (idle, walk, run frames) - UI element changes (button states) - Texture swapping (equipment changes, damage states) - Sprite sheet navigation - Dialogue portraits (expression changes) ## Runtime Behavior **Executes**: When activated, performs the specified sprite operation ```{raw} html
Generated UI Mockup — showing expanded properties
Sprite
-
x
Name:
Label this brick...
Target Node:
v
Action:
Play Animation
Animation:
default
v
Frame:
0
v
Texture Path:
v
Alpha:
1.0
v
Duration (s):
1.0
v
Speed
1.0
v
From Frame
0
v
Transition
Linear
Ease
InOut
Flip H
Flip V
Loop
Autoplay
Verbose
``` ## Properties | Property | Type | Default | Notes | |---|---|---|---| | Target Node | string | | Name or path of Sprite node to control (empty = self) | | Action | option | Play Animation | Sprite operation to perform | | Animation | string | default | [Play Animation] Animation name from SpriteFrames | | Loop | bool | True | [Play Animation] Loop the animation | | Autoplay | bool | True | [Play Animation] Start playing immediately | | Speed | float | 1.0 | [Play Animation/Set Speed] Playback speed multiplier | | From Frame | int | 0 | [Play Animation] Start from this frame index | | Frame | int | 0 | [Set Frame] Target frame index | | Texture Path | string | | [Set Texture] Path to texture resource (e.g., res://path/to/texture.png) | | Color | color | [1, 1, 1, 1] | [Set/Blend Color] Target modulate color | | Alpha | float | 1.0 | [Set/Blend Alpha] Target alpha (0=transparent, 1=opaque) | | Duration (s) | float | 1.0 | [Blend Color/Alpha] Tween duration in seconds | | Transition | option | Linear | [Blend Color/Alpha] Tween transition curve | | Ease | option | InOut | [Blend Color/Alpha] Tween easing mode | | Flip H | bool | False | Flip sprite horizontally | | Flip V | bool | False | Flip sprite vertically | | Modulate | color | [1, 1, 1, 1] | Legacy tint (use Set Color / Blend Color) | | Verbose | bool | False | Log color/blend operations for debugging | ## Example Use Cases **Manual Frame Animation**: ``` Delay(10, repeat=true) -> AND -> Sprite(action=Next Frame) // Advance one frame every 0.16 seconds (10 ticks) ``` **Character Walking Cycle**: > Sample inspector layout removed for compatibility. **Set Specific Frame**: ``` Property(state, Equal, idle) -> AND -> Sprite(action=Set Frame, frame=0) Property(state, Equal, walk) -> AND -> Sprite(action=Set Frame, frame=1) Property(state, Equal, run) -> AND -> Sprite(action=Set Frame, frame=2) // Set different frames for different states ``` **Weapon Swap (Texture Change)**: ``` Keyboard(1) -> AND -> Sprite(action=Set Texture, texture_path="res://weapons/sword.png") Keyboard(2) -> AND -> Sprite(action=Set Texture, texture_path="res://weapons/bow.png") // Swap between weapon sprites ``` **Damage State**: ``` Property(HP, Less, 30) -> AND -> Sprite(action=Set Texture, texture_path="res://player_damaged.png") // Change to damaged sprite when low HP ```