Download

Tips for managing input combinations

I’m working on input for the character and I’m starting to build support for button combinations being held down. This means that I have to run the code in a tick function so I can get updated values when these buttons are held down. I’m starting to realize that the code is going to look like a bunch of if (keybool) , else if (keybool2) etc… Or Possibly I could create a switch statement and use a global number then account for the different number combinations in the switch statement. This seems better but also difficult to manage. I’m wondering how others have approached this situation? Obviously the first way the tick function has to run through each possible key if statement and check so this seems silly.