0 votes

So I have my character animation set up with a State Machine in the animation tree. I want to lock my movement when I'm in the "Run" state.
Some things to note:

  • I can achieve this with an "if" statement in front of the "run" input checking if I'm attacking at the moment. I don't like this solution because I have to add every action that should stop the run.

  • I'm using "Move and Slide" for my movement, And "Move And Collide" for my gravity

In short, I'm trying to stop my character from running when I'm in the "Attack" state.

Godot version 3.2.1 stable
in Engine by (60 points)

1 Answer

0 votes

Try to add booleans like isattacking etc. And then add the isattacking to another condition in your running.

by (383 points)
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 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 webmaster@godotengine.org with your username.