Animation not playing with 2 Statemachines and Oneshot

Godot Version

4.3

Question

I have a simple character controller in an animation tree

Via the MoveStateMachine I select if the character is idling or walking

and the AttackStateMachine is supposed to select an attack

All of that is driving a skeleton and the basic movement works until I start selecting the attacks via the StateMachine. So whenever I request the state machine to fire it plays once but then remains on the last skeleton position of the attack and doesn’t return to the MoveState.

Is that a bug or am I not supposed to add 2 state machines to a OneShot Node?

Edit:
It is possible to change the animation by first getting the node in the AnimationTree
@onready var attack_animation = $AnimationTree.get_tree_root().get_node('AttackAnimation')
and then do attack_animation.animation = ‘animation_name’

but that feels a bit clunky and I would prefer to use a state machine, so hope someone can help :slight_smile:

You need to connect the state machine nodes to the End node or that node animation won’t end otherwise.

I only used OneShot with a single animation to play once, but what @mrcdk suggested makes sense to me, if there is no end to your state machine, the oneshot will never end.