Stuck on this error: add_node: Condition "states.has(p_name)" is true

Godot Version

v4.3.stable.official [77dcf97d8]

Question

Hi, i am converting my project from Godot 3.5.2. Unfortunatly, I am stuck on the last remaining error.
Here after the error message:

E 0:00:17:0558 add_node: Condition “states.has(p_name)” is true.
“<Source C++>” scene/animation/animation_node_state_machine.cpp:1258 @ add_node()

I already checked all my animations. I think all is fine (but i am may be wrong).
Has anyone ever encountered this error?
Thanks in advance for any help.

The code where you stucked is:

void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<AnimationNode> p_node, const Vector2 &p_position) {
	ERR_FAIL_COND(states.has(p_name));

which means there is a animation state named p_name already in the AnimationNodeStateMachine.

You can check if there are any animations with the same name in your animation resources and try grouping or renaming them.

Source:

Thank you so much dctewi for your reply. Your message helps me to find the root cause. Please see my reply on the main post.

FYI the problem is due to the name of one of my animation. I called it “Start”. It worked perfectly on Godot 3.5.2. But no more on Godot 4.3.
As I am using Animationtree. This name is already given to the AnimationNodeStartState. So renaming the animation “Start” is the solution to fix the error.
I hope this is clear and helpfull.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.