void grabcheckA(void Ani1, void Ani2, void Ani3)
{ // Hero's airgrab checker
// This script prevents hero from grabbing ground enemies, bikers, jetpacks, special enemies and non-enemy entities
// Ani1 = Grab animation to play
// Ani2 = Animation to play if hit enemy are bikers or jetpacks
// Ani3 = Animation to play if hit opponent are not airborne enemies
void self = getlocalvar("self");
void target = getentityproperty(self, "opponent");
if(target!=NULL()){
if(getentityproperty(target, "a") > 0){
int Check = checkgrab(target);
if(Check == 0)
{
changeentityproperty(self, "animation", openborconstant(Ani2));
} else if(Check == 1){
setlocalvar("Target" + self, target);
changeentityproperty(self, "animation", openborconstant(Ani1));
}
} else {
changeentityproperty(self, "animation", openborconstant(Ani3));
}
}
}
void grabcheckG(void Ani1, void Ani2, void Ani3)
{ // Hero's groundgrab checker
// This script prevents hero from grabbing airborne enemies, bikers, jetpacks, special enemies and non-enemy entities
// Ani1 = Grab animation to play
// Ani2 = Animation to play if hit enemy are bikers or jetpacks
// Ani3 = Animation to play if hit opponent are not ground enemies
void self = getlocalvar("self");
void target = getentityproperty(self, "opponent");
if(target!=NULL()){
if(getentityproperty(target, "a") == 0){
int Check = checkgrab(target);
if(Check == 0)
{
changeentityproperty(self, "animation", openborconstant(Ani2));
} else if(Check == 1){
setlocalvar("Target" + self, target);
changeentityproperty(self, "animation", openborconstant(Ani1));
}
} else {
changeentityproperty(self, "animation", openborconstant(Ani3));
}
}
}