Game Development Community

PlayThread, end of thread script callback?

by Matt Huston · in Torque Game Engine · 02/07/2009 (2:51 pm) · 2 replies

Is there a callback for a ShapeBase playThread. I need to run a script function once the animation has completed playing.

I don't think this should be too hard to implement but thought I read recently that it was already in the engine but I could not find that original thread or any references engine side.

#1
02/08/2009 (8:08 am)
Yes, the callback for that is called "onEndSequence", I believe. Look in shapebase.cc, in the ShapeBase::advanceThreads method.

There's a similar one for player objects when a sequence called by setActionThread is finished, which I believe is "animationDone".

#2
02/09/2009 (1:40 am)
Thanks, that is what I was looking for but couldn't remember the callbacks name.