0 votes

This is perhaps a more general coding question, but I have started to learn about state machines and would like to set one up for my player character.

In my case, my player can ATTACK, which would be its own state. The player can also WALK_STAIRS, which would also be a state. But the player should also be able to attack while walking in the stairs. Should this be its own state (STAIRS_ATTACK?), or should either the ATTACK or WALK_STAIRS state handle this combo?

in Engine by (57 points)

I found this tutorial on youtube, which seems to solve this problem by simply having several state machines coexisting. https://www.youtube.com/watch?v=BQwNiU5v9as

Please log in or register to answer this question.

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.