Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node started/finished signals for animation state machines #102398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-johnston
Copy link
Contributor

@a-johnston a-johnston commented Feb 4, 2025

Closes godotengine/godot-proposals#10253.

The other half of #102165

This adds node_started(StringName) and node_finished(StringName) to AnimationNodeStateMachinePlayback. Grouped StateMachines have their signals propagated up to the parent state machine, with their name prefixed. For example, with the following state machine:

Screenshot 2025-02-02 at 4 53 10 PM

Outer (grouped):

Screenshot 2025-02-02 at 4 53 21 PM

Inner (grouped):

Screenshot 2025-02-02 at 4 53 31 PM

the signals on the root playback are:

State machine node started:  Start
State machine node finished: Start
State machine node started:  Outer/Inner/Attack1
State machine node finished: Outer/Inner/Attack1
State machine node started:  Outer/Attack2
State machine node finished: Outer/Attack2
State machine node started:  Hit1
State machine node finished: Hit1
State machine node started:  End

Combined with #102165 the signals fire in the following order:

State machine node started:  Start
Node notify: MyStateMachine Started
State machine node finished: Start
State machine node started:  Outer/Inner/Attack1
Node notify: OneShot Started
State machine node finished: Outer/Inner/Attack1
State machine node started:  Outer/Attack2
State machine node finished: Outer/Attack2
State machine node started:  Hit1
State machine node finished: Hit1
State machine node started:  End
Node notify: MyStateMachine Finished
Node notify: OneShot Finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add node_started and node_finished signals to AnimationTree
2 participants