have an enemy with an animation player node. When clicked, the animation track should trigger. However, if you have multiple enemies, no matter which one you click, only the first added will trigger the animation. Why does this problem happen? What is the source of it? I’d like to know why btw since I plan on using Godot’s animation system more in the future
I’ve attached the project in case someone would like to check it out
Just a heads up of things I’ve tried:
Making the resource local to scene doesn’t work
*This funnily enough happens on this animation track, others I’ve tried are okay
Making the track unique (Aka - built-in) does not work
Trying to delete said enemy will prompt a check saying “Some nodes are referenced by animation tracks. Delete them?”, which I don’t understand why it says that, since currently the resource theoretically should be unique to all instances.
I cant open your project bc the structure doesnt make sense
I think the most likely explanation would be that these enemies are not instances of each other but duplicates of the first one, in which case the signal from the button is just cloned and linked to the first one.
To fix this you have to reconnect all the duplicate buttons signals to their respective enemies.
I would also reccommend you to rightclick on the first enemy and select save as independent scene. then you can instance him without any trouble and it gets easier to instnace him from script
The enemy is its own scene actually. I converted the animation resource for tres so you can read it in an text editor, and turns out the animation node was requesting a specific enemy inside a scene , basically meaning that it wasn’t targeting an enemy’s own properties, but looking for a specific enemy in a scene and looking for its properties. Since this is most likely a bug I will mark this topic as closed.