Need quick help in melee combat system

Hello There .

it's nice to back on track and being almost to release your game to the world .

I'm only needed some help in the last few things in my game, and one of them is
"melee combat system and A.I " .

the melee combat system I want contain, a skill list for both the player and the enemies

so quick preview for them :

for the player :
- I can make a couple of movement + decide the buttons, of course*
- I can make tons of mix combat **
- i can be specific what animation that shows (by mention it) + sounds***
- be specific what enemies health decrease

*all I mean here is that I want to customize the buttons

** like street fighter, or Tekken
A couple of moves that I can mix between them .

*** imagine it like I have three weapons and I mix between them by a series of buttons (Y,Y,G,H,G), BUT THERE another series (Y,Y,G,H,Y), the different in one button and the last animation for it .
so I can decide the series of buttons + animation + sounds = "Melee Combat System"

If P button pressed
{ do that animation }
Then if P pressed do that
If D do that

for the enemies AI + melee combat :
- he can counter my punches, and jump around me + mix his moves (just like me)
- I can decide the rate of chances to hit him*
- if I start a series of punches on him, the rate changes for me**

* he stops for a moment, without counter me or escapes, a rate like ( 1\10 ), means 1 success chance for every 10 punches from me ...

** means if i start, his rate to escape being like (6\10) ..

phew ... finally this only a 30% of the "melee combat system I talk about

please please please help me to do it.. help me to make the code, I'm not expert at all

if anyone interested in helping me for the rest of the "M.C.S" just contacts me here

thanks in advance..

Last edited:


šŸ§ *penguin noises*
GMC Elder
The easiest way to do this is to change the player into different objects (with different animations and behavior) for each button press, possibly pressing a button in one of the alternate objects makes you change again (for combo attacks and so on)... the AIs could use a bunch of instance_exists() checks for each object and react appropriately.
Yeah that was really helpful ..

But unfortunately my programming skills may be little.. I GOT the idea but not the code ..

So if you can gimme the code, that will be very helpful..