• 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!

Activate and Deactivate Regions or States

D

driversold

Guest
Working on a Beat Em Up and new to GM Studio 2.
I was thinking of assigning basic 3 kick combo to their own States/Regions. Once the player earns a Power Up, that Series of combos will need to be deactivated for x amount of time while a new Region/States of combos are activated until time runs out and it deactivates and original combo set activated.
So hit A button 3 times (Low, Mid, High Kick)
Get Power Up and it deactivates for day 10 seconds while new series of kicks is activated. Press A button 3 times (high Kick, leg Sweep, jump kick)

Is there a way to do such a thing?

thanks
 

TheouAegis

Member
Yeah, just base which kick to use on which powerup you have and what stage of the combo you're in. You should probably store the combos in a 2D array, with the primary index being which powerup you have and the secondary index being each stage of the combo.

kickCombo[0,0] = atk.LowKick;
kickCombo[0,1] = atk.MidKick;
kickCombo[0,2] = atk.HighKick;
kickCombo[1,0] = atk.HighKick;
kickCombo[1,1] = atk.SweepKick;
kickCombo[1,2] = atk.JumpKick;

(I just used enumerators for the contents, but you can do whatever works for you)
 
Top