How can I change the animation of the `AnimatedSprite` with visual scripts?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By naive231

Here is the sample codes from official documentation(tutorial):
Then I want to change the animation of the AnimatedSprite through visual scripts:
Change animation
But when I click the value of the Set Animation node, it pops up the dialog:
I am expecting to enter the animation’s name like “walk” or “up”, but I can’t.
I don’t know why it pops this dialog to me? I can’t select my animation with that.
Does anyone know what is going on?

:bust_in_silhouette: Reply From: njamster

I’m by no means an expert when it comes to VisualScript¹, but: I think you’re supposed to add a variable (click the plus-sign next to “Variables” in the bottom left of the view), set that variables type and value (righ-click the entry and choose “Edit Member”), drag the variable into the view to create a new block for it and then connect that block to the blue dot in the bottom right of the “Set animation”-block.

¹ In it’s current form I consider VisualScripting a gimmick. Its not well documented, far from intuitive and I wouldn’t know who to ask if I got stuck with it. I’d argue that it’s still easier to learn GDscript, which - unlike VisualScript - will prepare you for working with other high level programming languages like Python as well.