Game Development Community

How to interrupt/stop animations mid-sequence?

by Mr Tithlyon · in Artist Corner · 10/06/2005 (4:17 pm) · 3 replies

I have an ambient animation sequence that makes an AIPlayer look around, twiddle his thumbs, scratch his bum thoughtfully, etc, and it lasts about 10 seconds.

If after 5 seconds I tell him to get back to work you slacker using setMoveDestination(), he moves but doesn't change to the run animation until the ambient animation is complete.

Is there some way to stop/interrupt an animation sequence?

Neither stop() or stopThread(0) seem to work.

#1
10/08/2005 (9:51 am)
Hmm... I've been wondering the same thing, really.

Have you tried asking the Engine forum? They may know something about the stop and stopThread commands.
#2
10/08/2005 (10:01 am)
I dont know if this works. Try it.

in aiplayer.cs

and in function InsertPath

%player.pushTask("THATANIMATION(false)");
#3
10/09/2005 (5:22 pm)
Danny, good suggestion, I'll post there if it's not answered here.

Sventhors, thanks for your post. That won't solve the problem, though - the task code in aiplayer is just a way of lining up successive method calls to your bot:

eval(%this.getId() @ "." @ %this.task[%index] @ ";");

so that would attempt to call the animation as if it was a method.