• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM SOLVED Making Combo Keys with Controller

Since my last topic was mostly about finding a solution to any_key with the controller... id figure i'd just make a new post and start from scratch.

I'm just trying to figure out how to make a bunch of combination presses with the controller to perform a special move.

For instance in street fighter to do a Hadouken it would be Down > Foward > Punch
or to do a tornado kick it would be Down < Back < Kick.

I know how to do this on the Keyboard but i cant seem to figure it out for the Controller. Any useful tips would be helpful >_<! Thanks
 
C

CaffeineJunky

Guest
So there's a few things to consider here:

1.) The sequence of keys that are pressed;
2.) a measure of time between the key presses
3.) If the key press has sequence has been acknowledged (so you won't constantly be performing the combo).

First step: Adding the key and the time of the key press (in seconds should do) to respective containers (arrays / lists / maps).

Second step: when a key is pressed, scan the sequence of keys. If the keys are entered in the correct order within a correct timing range, then you did a combo. Do the combo, and acknowledge it was performed.

And note: you don't have to use the exact key value to represent the key that has been hit. You can use any distinct symbol to represent a key, button, or anything else that is in your combo system.
 
Top