I added an AnimatedSprite2D node and configured the sprite frame animation.
The animation created as default works fine, but when I start testing the game, it remains stopped and does not animate.
How can I make it animate automatically?
There is a section in the visual script state where animations can be configured. Have you set this up?
Mr. Tanaka,
I apologize for asking such a basic question.
How do I attach a visual script to an AnimatedSprite2D?
Does this mean that an AnimatedSprite2D alone cannot have an animation attached?
When I attach a script to an AnimatedSprite2D, instead of a visual script, I get a screen like the one below.
Visual scripts should be attached to the parent, root object. In fact, unless there is a specific reason, I believe the understanding is that visual scripts should not be attached to anything other than game objects.
Please re-read the section on the following page: “Finally, register the game object so it can be used with Visual Script. Select the Game Object node sample_2DSprite.”
Tanaka, thank you.
I understand that setting up animations when creating an object is done via “AnimationPlayer,” but how does “AnimatedSprite2D” relate to this?
I understand that if I set up animations using AnimationPlayer on an object and register a visual script, it will display correctly. However, in this case, wouldn’t it make more sense to simply configure everything with AnimationPlayer from the start?
I don’t understand the purpose or existence of AnimatedSprite2D.
I thought it was a Node designed for displaying sprite animations in a simple way, but is that not the case?
(I just want to place a few animated sprites as decorations within a stage.)
Ah, sorry… I thought it was the Animation Player. Since I haven’t used AnimatedSprite2D before, I looked it up, and it seems you need to either click “Auto Play After Load” in the Sprite Editor or handle playback via a script. I was able to get it working by referring to the page below, so please give it a try.
However, the Animation Player is generally more feature-rich, and Actuc’s Visual Script only supports the Animation Player, so personally, I might not recommend it very much…
AnimatedSprite2D cannot be used directly, so it must first be loaded into an AnimationPlayer.
Please check the following tips:




