P
Palocles
Guest
I'm implementing a State Engine for my game and I'm wondering how double tapping a button for a dash move, at higher speed than a walk, will interact with the state engine.
When the 'forwards' button is pressed the machine puts the player into the walk state but if i release the button, required for a double tap, the machine puts the player back into idle state. So how can I keep the player in the walk state until the second tap is made and changes the state to run? An alarm before it changes state back?
I thought I might have had a similar issue with double jump but with the code in the jump state and the release of the jump key not going to change the state immediately I don't think it will be a problem. But maybe I'll have an issue with coyote time or jump buffering?
Thanks.
When the 'forwards' button is pressed the machine puts the player into the walk state but if i release the button, required for a double tap, the machine puts the player back into idle state. So how can I keep the player in the walk state until the second tap is made and changes the state to run? An alarm before it changes state back?
I thought I might have had a similar issue with double jump but with the code in the jump state and the release of the jump key not going to change the state immediately I don't think it will be a problem. But maybe I'll have an issue with coyote time or jump buffering?
Thanks.