0 votes

I'm not sure if this is a bug, but I'll ask for a solution here.
I have a slime scene that attacks the player. It uses an AnimationPlayer node which contains the attack animations. The animations have tracks for AnimatedSprite:animation, AnimatedSprite:frames, and a track for disabling and enabling an Area2D's collision shapes, which are its attack areas.

The only problem comes when instancing multiple of them. When I instance multiple slimes, I get an error where the track couldn't resolve, and the AnimatedSprite and Area2D nodes weren't found.

Then they won't do their attack animation, or their animations glitch weirdly.
When I tried to restart the editor, the AnimationPlayer's animations were cleared of their tracks. I've had this problem for a while now, and I've tried saving the animations, deleting the slime instances, but the bug always happens no matter what. I want to know how to fix it.

asked Jul 1 in Engine by owlisGODOT (29 points)

2 Answers

0 votes

Hi, just need to get the correct path, just just get_node() instead of $ and insert the correct path , you could drag it form the editor.
good luck

answered Jul 1 by Jorge (198 points)
0 votes

Luckily, I've found the solution to this problem!
Turns out I had to put each of them under their own respective node. That way, their animations can work more efficiently.
I realized that each node must control their own things, and that was the reason why their animations were glitching.

answered Jul 3 by owlisGODOT (29 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.