wrenchman82
Member
Hi All,
This is something I've encountered in several different settings, but it manifests the same way. As an example, I have a flying enemy that spawns on the ground and has a spawn animation whereby it rises into the air and then should proceed normally at set 40. Here's an example.
anim Spawn
@script
void vSelf = getlocalvar("self");
if(frame==9){
int iTime = openborvariant("elapsed_time");
changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward
changeentityproperty(vSelf, "tosstime", iTime + 150);
}
@end_script
@script
void vSelf = getlocalvar("self");
if(frame==10){
performattack(vSelf, openborconstant("ANI_Attack3"));
}
@end_script
loop 0
delay 14
offset 47 91
bbox 38 41 16 52
@cmd degravity 1
@cmd dasher 0 0.4 0
frame data/chars/test/up_1.gif
frame data/chars/test/up_2.gif
frame data/chars/test/up_3.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_3.gif
frame data/chars/test/up_2.gif
frame data/chars/test/up_1.gif
@cmd dasher 0 0 0
frame data/chars/test/up_1.gif
@cmd degravity 0
@cmd dasher 0 0 0
seta 40
In this case, I have used both the "tosstime" and a "force attack animation" switch to try and remedy this, but the character reaches the end of this animation, and then just freezes on the last frame, or on the last frame of the forced attack (if I include it). Any idea why this is?
This is something I've encountered in several different settings, but it manifests the same way. As an example, I have a flying enemy that spawns on the ground and has a spawn animation whereby it rises into the air and then should proceed normally at set 40. Here's an example.
anim Spawn
@script
void vSelf = getlocalvar("self");
if(frame==9){
int iTime = openborvariant("elapsed_time");
changeentityproperty(vSelf, "velocity", 0, 0 , 0); // This is to stop entity from moving forward
changeentityproperty(vSelf, "tosstime", iTime + 150);
}
@end_script
@script
void vSelf = getlocalvar("self");
if(frame==10){
performattack(vSelf, openborconstant("ANI_Attack3"));
}
@end_script
loop 0
delay 14
offset 47 91
bbox 38 41 16 52
@cmd degravity 1
@cmd dasher 0 0.4 0
frame data/chars/test/up_1.gif
frame data/chars/test/up_2.gif
frame data/chars/test/up_3.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_4.gif
frame data/chars/test/up_3.gif
frame data/chars/test/up_2.gif
frame data/chars/test/up_1.gif
@cmd dasher 0 0 0
frame data/chars/test/up_1.gif
@cmd degravity 0
@cmd dasher 0 0 0
seta 40
In this case, I have used both the "tosstime" and a "force attack animation" switch to try and remedy this, but the character reaches the end of this animation, and then just freezes on the last frame, or on the last frame of the forced attack (if I include it). Any idea why this is?
