hello
iam trying to unbind a slamstart2 once the target health reaches 1 or 0
but It doesn't seem to work... the enemy keeps looping the slam...
iam trying with an updatescript in entity header
Is there a way to unbind a slam once the target health reaches 0
making the target then play death animation ?
I think the problem is that it cant check target hp2 health
ive used a similar script in the grabbed oponnent to play a follow2(death) once its health reaches 1 and worked...
iam trying to unbind a slamstart2 once the target health reaches 1 or 0
but It doesn't seem to work... the enemy keeps looping the slam...
iam trying with an updatescript in entity header
ive also tried changing to an animation so I could use depost/finish but it doesn't change...script @script
void main()
{
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
void hp2 = getentityproperty(target,"health");
if ( hp2 <= 1 ){
bindentity(target, NULL());
}
}
@end_script
#performattack(self,openborconstant("ANI_FOLLOW5"));
#changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW5"));
#bindentity(target, NULL());
Is there a way to unbind a slam once the target health reaches 0
making the target then play death animation ?
I think the problem is that it cant check target hp2 health
ive used a similar script in the grabbed oponnent to play a follow2(death) once its health reaches 1 and worked...