Combo system

Any one know how to setup a combo system?
so you can do special moves like in mortal kombat

Hi man,
basically for do a combo you have to meet some criteria right?
You have to be hit the target with the first move,
Than you should have a “tree” of attacks, something like, if you attacked 3 times normal punch, now you can use Blastarpunch.

Here an old answer about making a combo with time too.
When you try to hit something, check if you hit,
then every other attack will increase a value, and will let you choose , what to do with the attack n,1,2,3,4…
if you wait too long to attack , the timer will elapse and will reset the combo to 0.

you can build someting better using arrays and enumerators
but this is a good start to play

Thanks alot! Im trying to come up with keys like press fwd back fwd . Attack button can do a fire ball. Or back down up can grab the enemy. Etc. Ill study this. Appreciate it!