Game Development Community

Non-cicle IFL animation bug

by Vyacheslav Maltsev · in Torque Game Engine · 12/04/2007 (4:48 am) · 5 replies

Greatings, wise people!

Here's the problem:
I'm starting non-cicle IFL animation with playThread(0, "AnimName"). It plays well - no questions. BUT, then I try to play it once again by the same command - playThread(0, "AnimName") - no animation plays at all! Object gives no reaction! Script event "OnEndSequence" does not happening. By the way command playThread(0, "AnimName") returns TRUE - just like if animation started and everething is ok... But it's not!

Please help, wise people!

#1
12/04/2007 (5:26 am)
Try resetting animation:
%obj.stopThread(0);
before playing again.
#2
12/04/2007 (5:35 am)
I've tried that way - doesn't help :(
#3
12/04/2007 (5:42 am)
Seems like there is smart algorithm in engine (it's TGE 1.5.2 if I missed that) that don't let play sequence while it's not stopped. But, by some way at the end of animation thread doesn't finish animation properly :(
#4
12/04/2007 (6:38 am)
What happens if you switch threads, or use another one? I'm under the impression[from past experience], that Thread0 is very picky, like it's a specific thread for a specific type of animation[actionThread??], but I'm not certain.

...not a IFL-centric bug, but rather the quirky nature of the stock Animation system in general. I've never gotten the 'suggested' methods to always work, every once in a while, it refuses to reset....I tried to make a 'carnival-type' arcade object that spun in a random direction and speed with each registered collision, and it never really worked 100%; but I'm much more the Artist, than scriptor.

Perhaps, use the pauseThread and a cyclic animation as a 'hack'...that might work with some tweeking? I'm always interesting in Posts about play/stop/pauseThread's....:)
#5
12/04/2007 (11:20 pm)
Thanks Bank, thanks Rex!
Problem solved! Actually its neither problem nor a bug. Its all about network structure of Torque. My mistake was that I tried to start thread right after I stopped it. Torque just had no time to send stop command from Server to Client. From Torque's point of view it seems like thread never stopped at all!
So, all I have to do is give a little time to Torque. A several milliseconds. Thats enough.

Thanks for attention!