here is a fix for a bug where you can still hit the enemy if your juggle cost is above their juggle points and the first hit wont take the juggle cost away from juggle points.
Save the above code as "ondoattack.c" then declare it with each of your players scripts like this "ondoattackscript data/scripts/ondoattack.c".
Wish I had the ability to fix this directly in the engine on a developer level but hopefully one day I will get there.
for now Happy juggling lol
Code:
void main()
{//juggle system fix by msmalik681
void self = getlocalvar("self"); //get caller
void other = getlocalvar("other"); // get the enemy you are attacking
int jugglecost = getlocalvar("jugglecost"); //get jugglecost of current attack
int jugglepoints = getentityproperty(other,"jugglepoints"); //get juggle points of enemy
int maxjugglepoints = getentityproperty(other,"maxjugglepoints"); //get max juggle points of enemy
if(jugglecost!=NULL() && jugglepoints!=NULL() && maxjugglepoints) //if both juggle points and cost present and max juggle points are not zero
{
if(jugglecost>jugglepoints)
{
changeopenborvariant("lasthitc",0); //cancel last hit if juggle points higher then juggle cost
}else if(jugglepoints==maxjugglepoints) //if juggle points are max
{
changeentityproperty(other,"jugglepoints", jugglepoints-jugglecost); //take the juggle cost away from juggle points
}
}}
Save the above code as "ondoattack.c" then declare it with each of your players scripts like this "ondoattackscript data/scripts/ondoattack.c".
Wish I had the ability to fix this directly in the engine on a developer level but hopefully one day I will get there.
for now Happy juggling lol