Godot Version
4.6.1
Question
If I use only the first if statement it works fine, but as soon as i try to set the parameter when "has_started" isn't true, or set the parameter without a condition I get this error. I'm using the exact same logic with a different parameter somewhere at a previous point in the script without any issues. I have no idea what could be causing this, it seems like a completely nonsensical problem to me.
false is allowed, the condition just only advances when it’s true.
You can do it in one line:
animation_tree["parameters/conditions/is_starting"] = has_started
If has_started starts false, that set often runs before the AnimationTree is ready, which throws the error. By the time you set true, the tree exists, so it looks fine.
Make sure the tree is active first, and hover the condition under Parameters to copy the exact path. To go back the other way you need a second transition. One condition won’t react to false.
Ok, the tree not being active seems to have been the issue. I made sure “has_started” can only get checked once a movement input was pressed, so there is time before anything gets set. Still don’t understand why this happens with this transition specifically, because I could set all other parameters just fine without a workarround like that.
Thank’s!
Other params (blends etc.) are usually already there. Advance conditions only show up under Parameters once that transition exists and the tree is running, so setting is_starting too early fails.
Docs on that topic :
hope it helps.