Godot Version
4.3 stable
Question
I’m trying to get an animation tree working as a state machine and occasionally it just hallucinates an animation and gives me an error saying “get_frame_count: Animation ‘pinfjgce’ doesn’t exist.” with the animation name being seemingly random each time
I’m pretty sure the error happens whenever it’s in the “Fighting” state
Not sure what’s even causing the problem, so sorry if this overview doesn’t have enough (it’s also my second post on the forums so I’m not too sure about etiquette)
# States
func _process(_delta: float) -> void:
if state == "Walking":
state_machine.travel("Walking")
position.x -= speed
print("Walking")
elif state == "Fighting":
if attackReady:
state_machine.travel("Foreswing")
$"Attack Wait".start(atkRate)
attackReady = false
print("Fighting")
else:
state_machine.travel("Idle")
if health <= (maxHealth/(knockbacks+1))*unused_knockbacks:
state_machine.travel("Knockback")
position.x += kb_distance
unused_knockbacks -= 1
print("Knockback")
if health < 1:
state = "Dying"
await get_tree().create_timer(.5).timeout
queue_free()