Flying kick with attack2 button

cowboy01

New member
Hi everyone.
On one character, instead of the classic three buttons: attack, jump, and special, I made an alternative version with two attack buttons (one for punches, one for kicks), then jump and special.

The extra button is the kick button (Attack2), and I can chain the two attack combos. So far, so good.

The problem is with the jump forward + kick animation, specifically the "anim jumpforward".
In OpenBoard, the default is jumpforward+attack (my punch button). If I press Attack2 (kick) while I'm jumping forward (thanks to the CANCEL command in jump), the freespecial dedicated to the mid-air kick animation is activated, but the jump physics are broken in mid-air.

I can work around the problem with the "jumpframe" command in the freespecial animation, but the jump arc isn't natural; it's a bit noticeable.

Are there any other possible solutions?

Thanks
 
You need a keyscript

in the header of your character put

keyscript data/chars/character/key.c

put this in the character key.c file

C:
void main()
{
    int iPlIndex = getlocalvar("self"); //Get calling player
    void vSelf     = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key status of "Attack 2"
    void vAniID    = getentityproperty(vSelf,"animationID"); //Get current animation ID


    if(vAniID == openborconstant("ANI_JUMP") || vAniID == openborconstant("ANI_FORWARDJUMP")){ //Jumping? 
        if (iAttack2){ //New A2 key press?
            performattack(vSelf, openborconstant("ANI_FREESPECIAL5")); // Change to A2 AIR KICK
        }
    } 
}
 
Last edited:
You need a keyscript

in the header of your character put

keyscript data/chars/character/key.c

put this in the character key.c file

C:
void main()
{
    int iPlIndex = getlocalvar("self"); //Get calling player
    void vSelf     = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key status of "Attack 2"
    void vAniID    = getentityproperty(vSelf,"animationID"); //Get current animation ID


    if(vAniID == openborconstant("ANI_JUMP") || vAniID == openborconstant("ANI_FORWARDJUMP")){ //Jumping?
        if (iAttack2){ //New A2 key press?
            performattack(vSelf, openborconstant("ANI_FREESPECIAL5")); // Change to A2 AIR KICK
        }
    }
}
I followed your instructions:
I inserted the line in the character's txt file and created the .c file. I changed the exact number of the freespecial(11).

But... "Can't compile script 'entitykeyscript' data/chars/chen/chen.txt"

I'm using OpenBoR v3.0 Build, Compile Date: Aug 29, 2018
 
Back
Top Bottom