O Ilusionista
Captain 100K
Hi.
I want to use a looped animation that, once the elapsed time reaches X, the entity would change to another attack, but something is wrong (crashing or not working).
At frame 0, I get the elapsed_time and after it reaches elapsed_time+1000, it should go to attack1, but it crashes. If I remove the frame==0 part, it doesn't crashes but
This is my code
What I am doing wrong?
I want to use a looped animation that, once the elapsed time reaches X, the entity would change to another attack, but something is wrong (crashing or not working).
At frame 0, I get the elapsed_time and after it reaches elapsed_time+1000, it should go to attack1, but it crashes. If I remove the frame==0 part, it doesn't crashes but
This is my code
Code:
@script
if (frame==0)
{
void self = getlocalvar("self");
int time = openborvariant("elapsed_time");
}
if (time==time+1000)
{
performattack(self, openborconstant("ANI_ATTACK1"));
}
@end_script
Script compile error in 'animationscript': time line 47, column 8
What I am doing wrong?