Animation Threads
by Matthew Jones · in Torque Game Engine · 01/04/2003 (9:05 pm) · 3 replies
The engine exports 4 methods to use animation threads in the script. Each of these depend on the data structure ShapeBase::mScriptThread, which is initialized in ShapeBase.h as a Thread Array of size 4. In ShapeBase.cc it is initialized with the 6 fields: sequence, thread, sound, state, atEnd, and forward in each record. mScriptThread is public in ShapeBase, but is not exported to the scripts (via Con::addField). Attempts to reference it in wheeledVehicle (a descendent of ShapeBase) don't yeild anything. Calls to %obj.playThread()where %obj is any object I can think of show no results. What gives? What am I missing?
#2
01/05/2003 (7:34 am)
Thanks for the reply. Did a search for $ActivateThread in the C++ code and didn't find it. Did find "mActivateThread" declared at line 124 of the projectile.h as a pointer to a TSThread which is a TGE class. Since the only place you find mActivateThread is in projectile.h and projectile.cc, it's reasonable to assume that this is projectile specific usage. I'm looking for answers about the general use of the animation threads and thread array defined in ShapeBase code.
#3
another example might be %obj.playThread( $CurrentThread,"run");
01/05/2003 (10:07 am)
doh actually the $activeThread is the activeThread, it is a scripts side variable, the "open_door" refers to an animation sequence in the dts fileanother example might be %obj.playThread( $CurrentThread,"run");
Associate Anthony Rosenbaum