Godot 4
I have a scene that I instantiate every time the player takes damage which includes a Sprite2D and an Animationplayer. In the ready(): function of the node it randomises the second frame of an animation and then plays that animation instantly. This works as intended but if the same node is already in a scene while a node is being added to it, it randomizes the animation again when the new scene is added, causing the keyframes of the already existing scene to also be randomized and causing the sprite to shift and jitter suddenly as a result.
Iāve tried to make the instantiated scene have all itās resources be ālocal to sceneā but that doesnāt seem to work for some reason? Any people with the same question seem to be from when Godot was in 3.0, so I wonder if things have changed in Godot 4?