So here’s an image of how my movement states interact.
Is there a more efficient system than using the tick event combined with branches? Or at the very least, is there a more efficient way to setup these branches? Because what I want is several kinds of states, some of which are not quite compatible. An example would be that I can’t sprint and crouch at the same time. If I press the crouch button, I stop sprinting. If I press the sprint button, I stop crouching. I already have it setup so that I’ll stop crouching when I press sprint (if I’m already crouching). But the systems are a little complex, and when you have hierarchical systems like in branches, you either have to setup something semi-complex, or just find the best layering for your current setup.
Currently, in this system, if I’m holding the walk key, and then I press sprint, it doesn’t transition me into sprinting. But if I’m holding the sprint key, and I press the walk key, then walking overrules sprinting (and if I let go of the walk key, I start sprinting without having to press it again). And if I’m sprinting, pressing the crouch key won’t overwrite my sprinting.