kimono
Well-known member
Hi, I try to input an attack 3 button that activates a freespecial. It works partially, my only problem is that the character stay in freespecial and not return to idle.
Here's my small part of code (I'm still learning
):
Any idea to return to normal state after performing anim freespecial?
Here's my small part of code (I'm still learning
Code:
void main()
{
int iPlIndex = getlocalvar("player"); //Get calling player
void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
int iDir = getentityproperty(vSelf, "direction"); //Get current facing direction
void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); //New key status of "Attack3"
void iAttack4 = playerkeys(iPlIndex, 1, "attack4"); //New key status of "Attack4"
void iLeftR = playerkeys(iPlIndex, 2, "moveleft"); // Release status of "Left"
void iRightR = playerkeys(iPlIndex, 2, "moveright"); // Release status of "Right"
// attack3
if(vAniID == openborconstant("ANI_IDLE")){
if(playerkeys(iPlIndex, 0, "attack3")){ //Attack3 button is held?
performattack(vSelf, openborconstant("ANI_FREESPECIAL"));
}
}
}