+1 vote

Greetings! I've got a rather advanced question about animator advance conditions.

I've got two animations in my state tree:

 _______  -->  _______
|  IDLE |     |  WALK |
|_______| <-- |_______|

This seamless transition is done using ADVANCE CONDITIONS! (woo!)

All animations (such as jumping) are connected to IDLE, With the help of the travel() method, we get a direct change FROM walk THROUGH idle TO the desired animation. It works great. When the jump ends, the handy advance condition "walking" informs it to immediately go back to the walking animation.

    # Just leave this thing on as long as the player is moving left or right.
    # It'll auto-play walking when idle, and do nothing on other animations.
    animator["parameters/conditions/walking"] = true


So how can I make the not_walking condition? When a player stops walking, the condition should invert to inform the animation to change to idle. But that part's not so pretty. Right now I've just got:

# Hooray! Except maybe this is overkill? An extra variable just for NOT WALK?
animator["parameters/conditions/walking"] = true
animator["parameters/conditions/not_walking"] = false
animator["parameters/conditions/walking"] = false
animator["parameters/conditions/not_walking"] = true

Every time! It's fine, but it's not great. I want the advance condition in the transition to be like "!walking" so for both TO and FROM walking can depend on the single "walking" condition.

Is that a thing? I WANT IT TO BE A THING!

in Engine by (181 points)

1 Answer

+1 vote
Best answer

This has been pointed out, I created an issue in the proposoals site:


And Riteo made a pull request to merge the change into the repository:

Pull request

Right now we need to wait until the change is merged, in the meanwhile you have two options:

A) Continue to work with the not_ variables
B) Compile Godot yourself and add the changes from Riteo

Right now I'm just using the option A.

by (1,002 points)
selected by

That's awesome news! Thank you so much!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.