GM:S 1.4 Combat system problems

Discussion in 'Programming' started by CRISTOPHER25456, Mar 7, 2019.

  1. CRISTOPHER25456

    CRISTOPHER25456 Member

    Joined:
    Mar 7, 2019
    Posts:
    2
    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: Mar 7, 2019
  2. CRISTOPHER25456

    CRISTOPHER25456 Member

    Joined:
    Mar 7, 2019
    Posts:
    2

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice