Hi, another question as I struggle with my own movement script...:

I'm trying to get my character to kick and punch. I've got him kicking very nicely with the following code, but just have one small problem: if you keep kicking, every so often the kick animation seems to start part-way through, not from the beginning. I've got a feeling this is because the _animdist skill needs resetting before the animation starts, but if I just put "my._animdist=0;" before "my._animdist += time", then the animation freezes completely...

If anyone can figure this out I'd be very grateful (sorry if this is a really dumb question - my mind seems to have frozen from looking at too much code...).

code:
//Right mid kick:
IF (MY._movemode == _Rmidkick_mode)
{
my.__indie_play=on;
MY._animdist += TIME;
anim_ticks = 100 * MY._animdist / 8;
while(my.__indie_play==on)
{
ent_frame(Rmidkick_str,anim_ticks);
IF (anim_ticks > 99)
{
MY._movemode = _stand_mode;
MY._animdist = 0;
my.__indie_play=off;
}

wait(1);
}
RETURN;
}

Cheers,
Keith