Legacy GM Combat system problems

Hi all!

I have some problems and I hope they can orient me a bit, I'm doing a beat em up game but I can not polish the combos and combat system.

when you press a key to attack for example the Z the character releases a punch and the same with the X releases a kick

the problem comes when you try to press the 2 keys at the same time to be able to make a special attack by pressing both sometimes makes the special attack and other times it simply makes a normal attack

Any idea of how to always make it consistent? they are basic combos like X + Z but I can not make it work.

first of all, Thanks!

here is the code:

Code:
if z_key && x_key && canpunch=true && holding=false
{
canpunch=false
lock_basic=true
current_attack="headhit"
image_index=0
lockh=true
lockv=true
v=0
h=0
}
else
if z_keyD  && canpunch=true
{
image_index=0
canpunch=false
lockh=true
lockv=true
current_attack="punch"
v=0
h=0
}
else
if x_keyD && canpunch=true
{
keyboard_string=""
image_index=0
canpunch=false
lockh=true
lockv=true
current_attack="kick"
v=0
h=0
}
}
 
Last edited:
Top