Here is my code to try start the animation:
extends Node3D
# Declare the AnimationPlayer node
@onready var anim = $AnimationPlayer
func _ready():
# Ensure the AnimationPlayer node is available
if anim == null:
print("AnimationPlayer node not found!")
return
func _process(delta):
# Check if the attack input action is pressed
if Input.is_action_just_pressed("attack"):
print("RECIEVED INPUT")
# Play the fire animation
anim.stop("idle")
anim.play("fire")
anim.play("idle")
print("PLAYED ANIMATION")
In the animation tree, the idle animation is set on loop if that’s helpful.
help, please