void main()//keyscripts
{//msmalik681 combo attack with a2
if (openborvariant("in_level")){
int playerIndex = getlocalvar("player"); //Get calling player
void self = getplayerproperty(playerIndex ,"entity"); //Get calling entity
void exists = getentityproperty(self, "exists"); // Is caller alive
char name = getentityproperty(self, "name"); // Get callers name
void vAniID = getentityproperty(self,"animationID"); //Get current animation ID
void vAniPos = getentityproperty(self, "animpos"); //Get current animation frame
int iDir = getentityproperty(self, "direction"); //Get current facing direction
float x = getentityproperty(self, "x");
float y = getentityproperty(self, "y");
float z = getentityproperty(self, "z");
float base = getentityproperty(self, "base");
void iStart = playerkeys(playerIndex, 1, "start"); //New key status of "Start"
void iUp = playerkeys(playerIndex, 1, "moveup"); // New key status of "Up"
void iDown = playerkeys(playerIndex, 1, "movedown"); // New key status of "Down"
void iLeft = playerkeys(playerIndex, 1, "moveleft"); // New key status of "Left"
void iRight = playerkeys(playerIndex, 1, "moveright"); // New key status of "Right"
void iJump = playerkeys(playerIndex, 1, "jump"); //New key status of "Jump"
void iSpecial = playerkeys(playerIndex, 1, "Special"); //New key status of "Special"
void iAttack = playerkeys(playerIndex, 1, "attack"); //New key status of "Attack"
void iAttack2 = playerkeys(playerIndex, 1, "attack2"); // New key of "Attack 2"
void iAttack3 = playerkeys(playerIndex, 1, "attack3"); // New key of "Attack 3"
void iAttackR = playerkeys(playerIndex, 2, "attack"); //New key status of release "Attack"
void iSpecialR = playerkeys(playerIndex, 2, "Special"); //New key status of release "Special"
void iJumpR = playerkeys(playerIndex, 2, "jump"); //New key status of "Jump"
void iRightR = playerkeys(playerIndex, 2, "moveright"); // New key status of "Right"
int counter, time; //placeholder for time and counter check
int timeplus = 150; //set minimum time to press button before reset
if(counter==NULL()){counter=0;} //set counter to zero just on first run
if(iAttack2) //if you press attack2
{
if(counter==0 && (vAniID==openborconstant("ANI_IDLE") || vAniID==openborconstant("ANI_WALK"))) //if counter is 0 and you are in one of these animations.
{
time = openborvariant("elapsed_time")+timeplus; //set time to current time + timeplus
performattack(self, openborconstant("ANI_ATTACK1"),0); //perform attack
changeentityproperty(self, "velocity", 0, 0, 0); //stop player from keeping walk velocity
counter++; //increment counter
} else if(counter==1 && time > openborvariant("elapsed_time") && (vAniID==openborconstant("ANI_IDLE") || vAniID==openborconstant("ANI_WALK") || vAniID==openborconstant("ANI_ATTACK1")))
{
time = openborvariant("elapsed_time")+timeplus;
performattack(self, openborconstant("ANI_ATTACK2"),0);
changeentityproperty(self, "velocity", 0, 0, 0);
counter++;
} else if(counter==2 && time > openborvariant("elapsed_time") && (vAniID==openborconstant("ANI_IDLE") || vAniID==openborconstant("ANI_WALK") || vAniID==openborconstant("ANI_ATTACK2")))
{
time = openborvariant("elapsed_time")+timeplus;
performattack(self, openborconstant("ANI_ATTACK3"),0);
changeentityproperty(self, "velocity", 0, 0, 0);
counter++;
} else if(vAniID==openborconstant("ANI_IDLE") || vAniID==openborconstant("ANI_WALK")) //this is the reset animation if they did not hit the next button in time
{
time = openborvariant("elapsed_time")+timeplus;
performattack(self, openborconstant("ANI_ATTACK1"),0);
changeentityproperty(self, "velocity", 0, 0, 0);
counter=1;
}
}
}
}