lifespan {value}
~Sets entity's lifespan after the entity is spawned. {value} is in seconds and it supports decimals.
~After {value} expires, entity will die and will play entity's death animation if the entity has it.
~Entity who uses this can die normally if {value} hasn't expired of course.
Bloodbane said:Are you only requesting script to kill enemy after some defined time has passed? I asked cause there's big difference between changing to certain animation and playing DEATH
Also changing animation directly after some defined time is kinda risky cause it is possible the entity is playing FALL animation when 'changing time' is on
So what is exactly you wanted to create?
BeasTie said:lifespan will play death animation when it expires.
lifespan {value}
~Sets entity's lifespan after the entity is spawned. {value} is in seconds and it supports decimals.
~After {value} expires, entity will die and will play entity's death animation if the entity has it.
~Entity who uses this can die normally if {value} hasn't expired of course.
anim spawn
@script
if(frame==7){
void self = getlocalvar("self");
setentityvar(self, 1, openborvariant("elapsed_time"));
}
@end_script
(SPAWN animation here)
anim idle
@script
void self = getlocalvar("self");
int Summon = getentityvar(self, 1);
if(Summon <= openborvariant("elapsed_time") - 6000){
setentityvar(self, 1, NULL());
performattack(self,openborconstant("ANI_FOLLOW2"));
}
@end_script
(IDLE animation here)
anim walk
@script
void self = getlocalvar("self");
int Summon = getentityvar(self, 1);
if(Summon <= openborvariant("elapsed_time") - 6000){
setentityvar(self, 1, NULL());
changeentityproperty(self, "velocity", 0, 0, 0);
performattack(self,openborconstant("ANI_FOLLOW2"));
}
@end_script
(WALK animation here)