Animation change problem

msmalik681

OpenBOR Developer
Staff member
Code:
void anichange(void Ani)
{// Animation changer
    void self = getlocalvar("self");

    changeentityproperty(self, "animation", openborconstant(Ani)); //Change the animation
}

when i use the above script it works fine for players and idle objects. When used for enemies once they play the animation they are forced to they get stuck and the AI wont take over unless they get hit is there any fix for this ?
 
Actually, that function is not really stable for players that's why I only use it in correct animation and state, for instance, use anichange in attack animations to change to another attack animations.
I don't use this to change from IDLE or WALK to other animation.

If you want to forcefully change from those 2 animations to attack animation, you should use this instead:


void attack0(void Ani)
{// Attack interruption
    void self = getlocalvar("self");

    performattack(self, openborconstant(Ani)); //Attack!
}
 
Back
Top Bottom