I'm trying to write a script that will create certain animations for some of my characters. The error it throws is:
get_node: (Node not found: "sprite:frame" (relative to "/root/Main/ViewportContainer/Viewport/TestScene-NoGUI/YSort/PlayerCharacter").)
<C++ Error> Condition "!node" is true. Returned: nullptr
<C++ Source> scene/main/node.cpp:1325 @ get_node()
_update_caches: AnimationTree: 'IdleSouth', couldn't resolve track: 'sprite:frame'
<C++ Source> scene/animation/animation_tree.cpp:562 @ _update_caches()
and then a bunch of these over and over:
_process_graph: Condition "!track_cache.has(path)" is true. Continuing.
<C++ Source> scene/animation/animation_tree.cpp:828 @ _process_graph()
The relevant code can be read at this Pastecode link:
https://pastecode.io/s/21b8s0k4
When I run the project, it throws the above errors. I checked the Remote scene tree while the project is running and the character, sprite, animation player, and animation tree are all in the scene tree. The function to create the animations is called in the character's _ready() function, and there are no errors related to the other properties showing, only the "sprite:frame" property.
My print statements all indicate that the animation is being built correctly. The expected number of keyframes are returning on each path, and the frame keyframes are the values I'm expecting them to be, which means that the path is valid during the creation of the animation, right?
What am I doing wrong?
Thanks in advance!