State machine to play animations....but how?

Godot Version

4.3

Question

i tried to follow up this video tutorial:

but I cannot fully understand how to play animation by using animation tree rather than AnimationPlayer…
Honestly I cannot understand with what I have to substitute usage of AnimatedSprite2D.play (eg. AnimatedSprite2D.play(“JUMP”)) by using the state machine solution…
Ok, since what I understood It shoul be based on value of blend position I defined; Prameter is named ‘Walking’; following a screenshoot:

but It looks like not working

AnimatedSprite2D does not play nice with any other node.
you need to make your animations in an AnimationPlayer, and then reference it in your AnimationTree.
AnimationTree can then play the animations of the AnimationPlayer.

you could make animations in AnimationPlayer executing the play function on an AnimatedSprite2D, but that would be a lot of extra code and work and not optimal.

for a blend you need to set it from a script, like this:

set("parameters/playback/walking", how_much)

the path will autocomplete as you type, allowing you to chose the one you need.

AnimatedSprite2D does not play nice with any other node.
you need to make your animations in an AnimationPlayer, 
and then reference it in your AnimationTree.

I did…but sprite (which is the player) doesn’t get animated…