The Daily Click ::. Forums ::. Klik Coding Help ::. how to make melee combo system?
 

Post Reply  Post Oekaki 
 

Posted By Message

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
3rd January, 2013 at 03/01/2013 16:31:37 -

how does one go about making a sidescroller melee game with combo's? like x x y is a different combo from x y y, instead of simply having one combo like in the megaman zero series.the idea is to evventually have randomly generated weapons with randomly generated combos depending on what pieces make up your weapon.

 
[Game design makes my brain feel like its gonna explode.]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
3rd January, 2013 at 03/01/2013 18:44:13 -

I've not done this myself, so this is speculation at best.

I would attempt to trip flags when a button is hit, and then if another button is hit within a certain amount of time, then the next stage of the combo occurs. Something like this...



IF "X" key is pressed
AND IF Flag 1 of Player is ON
AND IF Alterable Value "C" of Player <1
THEN Set Flag 1 of Player to ON
AND THEN Set Animation State of Player to 1

IF Flag 1 of Player is ON
THEN Add 1 to Alterable Value "C" of Player

IF Flag 1 of Player is ON
AND IF Alterable Value "C" of Player > 20
THEN Set Flag 1 of Player to OFF
AND THEN Set Alterable Value "C" of Player to 0

IF "X" Key is pressed
AND IF Flag 1 of Player is ON
AND IF Alterable Value "C" of Player < 20
THEN Set Flag 2 of Player to ON
AND THEN Set Alterable Value "C" of Player to 1


AND THEN Set Animation State of Player to 2

Imagine that the "X" key is the attack key. Alterable Value C of Player is the timer for combo completion. Flags 1 and 2 are signals for the combo to continue.

Try something like that. I'm sure I missed something related to animations, but my lunch break is over.

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
3rd January, 2013 at 03/01/2013 19:26:52 -

yea that was kinda what i had in mind, i just figured id ask. ill have to play around with it.

 
[Game design makes my brain feel like its gonna explode.]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
4th January, 2013 at 04/01/2013 18:28:01 -

In my first step, I meant it to read:


IF "X" key is pressed
AND IF Flag 1 of Player is OFF



Sorry about that; I was rushed at the time, and when that happens my copy and paste skills are a little sharper than my editing skills.

 
n/a

tetsuya_shino



Registered
  12/08/2004
Points
  491
5th January, 2013 at 05/01/2013 00:48:50 -

This what I used when trying make a Xenogears style battle system. The same basic idea would work in an action game.

First thing you want to do is map out all possible combos. If the combos differ per weapon and/or there are combo moves that have to be learned or unlocked, you need to keep this in mind. Use a flag or an alt value to keep the player from doing actions they shouldn't know yet.

Once you have mapped out all possible combos on paper or a text doc, then its time to get to work. By using a counter and keeping track of the current animation playing, its simple.

For example when your character is in his idle animation the animation the Combo Counter is 0. When you press [x] the first time it is set to 1. If you press [x] again before the first animation ends the combo counter will change to 11.
Or if you press [x] set it to 12. Doing nothing, the animation will end and return to idle, and of course the combo counter will return to 0.

So in the examples you gave [x][x][y] would be 112, while [x][y][y] would be 122. And if you wanted to add a hidden move, just add a flag or alt value condition to the code.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click