$12256 / $11500
I would like a passive power to grant magic shield when you are below half health.
I have set up passive_trigger=on_halfdeath but the problem is once your character is below half health it would keep continously casting instead of simply casting it once only at the point when the halfway mark is crossed.
Can anyone help me with the config of this so that this will work as intended?
Happy new year!
insert new variable called "a".
a=0;
health=100;
*****
step will be:
if a=0 {
if health>=50 then {exit;// if needed magic_shield_activation=false;}
a=1;//this is the key
// _____ here create that casting effect; ____ magic_shield_activation=true;
}
"a" is crucial variable to block future effect.
******
//if health is recovered a=0 is again.
if health>=50{a=0;magic_shield_activation=false;}
all of this actually depends how that ship react in various situations, and code optimization with command "else" or use switch() command with plenty of breaks;
Don`t use many "if" per step, it is bad.
P.S ..don`t forget to destroy animation object at shield animation end ..
in case that animation is a part of that character then you need additional timer variable.