I have made a keyscript to cancel into a air attack using performattack command but when the player runs their air attack they will play full animation before they hit the ground is there anyway to fix this problem ?
tried landframe but it did not work
here is the code:
void main()//keyscripts
{
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
int x = getentityproperty(vSelf, "x");
int y = getentityproperty(vSelf, "a");
int z = getentityproperty(vSelf, "z");
void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
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 iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"
if(vAniID == openborconstant("ANI_FORWARDJUMP")){
if(iJump){
performattack(vSelf,openborconstant("ANI_FREESPECIAL5"),1);
}
}
}
just fixed this by changing performattack with changeentityproperty(vSelf, "animation", openborconstant("ANI_FREESPECIAL5"),0);
I have a issue with the above script can anyone tell me what the last digit highlighted in red controls ?
tried landframe but it did not work
here is the code:
void main()//keyscripts
{
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
int x = getentityproperty(vSelf, "x");
int y = getentityproperty(vSelf, "a");
int z = getentityproperty(vSelf, "z");
void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
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 iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"
if(vAniID == openborconstant("ANI_FORWARDJUMP")){
if(iJump){
performattack(vSelf,openborconstant("ANI_FREESPECIAL5"),1);
}
}
}
just fixed this by changing performattack with changeentityproperty(vSelf, "animation", openborconstant("ANI_FREESPECIAL5"),0);
I have a issue with the above script can anyone tell me what the last digit highlighted in red controls ?