Hey there. I've been trying to figure out how to program an advanced combo system in my fighting-style game. I was able to make a simple one using a single Array object that pushes forward a new variable every time a new input is entered; which worked out great. However, I'd like there to be multiple Arrays so multiple buttons can be entered at once. Here's an example from Darkstalkers. The box to the left should give you a better idea.
https://media.discordapp.net/attachments/1304151037896032352/1332220656544251925/2025012323480400-2966C7FAD201E2CD337BC0FF3CBBC097.gif?ex=679476ab&is=6793252b&hm=59a346c7f399f705697b19a0733c449eeca694df8226b0713ae79a55922b26a5&=
How should I tackle this? Any help at all is much appreciated.
That url is broken goes to nothing. From your description though, multiple arrays doesn't sound like the best way. You can append button presses to create one string and compare it as matching a combo or that would be my approach.
Develop games in your browser. Powerful, performant & highly capable.
When any button is pressed, append it to a string variable. Then check if this string ends with a specific sequence of characters.
+ Keyboard: On any key pressed Set keySequence to keySequence& to Keyboard.StringFromKeyCode(Keyboard.LastKeyCode) if right(keySequence, 4)="1234" ... do something if right(keySequence, 5)="IDDQD" ... do something else