is there any way to disable movement from only 1 direction? As in,
when X happens > ignore 8direction user input
but only for walking right? So that I can walk all other directions except right?
Develop games in your browser. Powerful, performant & highly capable.
You can disable the default controls on 8direction and set up your own in events.
Right arrow key is down -> Simulate pressing right etc...
Then you can add whatever conditions you want. For example: give the player an AllowedToMoveRight boolean and you can have the conditions:
Keyboard: Right arrow key is down
Player: Is AllowedToMoveRight -> Player: Simulate pressing right
Then you can toggle that boolean to prevent walking in that direction.