I’m building a complicated input system for a game like Virtua Fighter. I got most of it working now, but I’m trying to add simultaneous input detection, Guard + Punch + Kick for example, and I have run in to this problem…
The very base for the simultaneous input detection that I’m using, is a boolean array with every index used for a specific key.
I created some key action events to fill it in.
When a key is pressed, the index linked to it is set to true. When released, that same index is set to false.
It works fine if I do every key one at a time, or a maximum of two keys at once.
If I try 3 or 4… I get some strange behavior.
Example, pressing more than 2 buttons at once, makes the array not update at all.
If I press 2 at once, it’s fine. If I hold those two and press another, It will not update.
It’s like the system can only handle two buttons held at a time.
Can I get a clue on how to fix this?