This isn’t a major issue but just something annoying that I can’t figure out without creating even more boolean values to check.
In my Top Down RPG when my player moves around it counts down a variable which triggers battle when it reaches zero. The same keys are used in the battle menu to select between attacking and running away. (left and right arrow) If i’m moving right when battle starts then my menu selection moves to the right which selects running away, but I don’t want that to happen unless they press right after the battle starts.
It’s currently on key released, but that just delays the inevitable.
The battle is meant to be quick, basically I want experience of a monster popping up and you can just spam enter to attack and kill, then move on. This keeps making me accidently run away.
Game is here: https://themitchnz.itch.io/tribute-to-the-red-dragon (You’ll need to leave the village before a battle is triggered)