Solved changing animation through keyscript

Question that is answered or resolved.
Greetings, everyone!

I'm having a hard time trying to set a keyscript that allows me to change a character's animation through the hit of a button (retaining it's momentum).
here's the code that I did:
C:
#import "data/scripts/animation/lib_anim.c"

void main()
{
    void Self     = getlocalvar("self");
    void Player = getentityproperty(Self, "playerindex");
    void Keys     = getplayerproperty(Player,"keys");
    void Anim     = getentityproperty(Self, "animationid");
    
    if (Keys & openborconstant("FLAG_JUMP"))
    {
        if (Anim == openborconstant("ANI_JUMP"))            {Animation_Change("FREESPECIAL13");}
        if (Anim == openborconstant("ANI_RUNJUMP"))             {Animation_Change("FREESPECIAL13");}
    }
    
}

The code IS working when I press jump while in midair... But it also works if I press ANY button while holding Jump while in midair.
How can I detect the PRESS of jump, and not if it is HELD?
 
Back
Top Bottom