In the same article there’s a “Controlling from code” section, does this help? There are a lot of different parameters to a AnimationTree, what are you trying to do specifically? What does your tree look like?
I saw the manual but I didn’t understand how to apply the script, I tried but it always gives error, I want to attack2 only start after attack1 finishes and vice versa, here my tree ( atacar is attack)
I made something like this work. However, I also had an idle/walk/run state in the state tree to go back to. The way you have this setup, you can only do 1 then 2. I recommend you go follow a tutorial or three on animations with state machines. Here’s one you can look at.
Every possible animation path has to be in the state machine to work in code. It is possible. You just need to make sure the state machine has Run at End selected in the transition.
Running through a few tutorials will help you master this, as it is complex.
Honestly though, I recommend you re-think the combo attacks. I don’t have code to share because I pulled it from my game after playtest feedback. Just map each attack to a different button and save yourself a lot of headache.
compilation of errors said that the animation tree was not in the character body and I tried to fix it but I did worse, now when it runs everything is black, without scenery