ShapeBase Question on Threads
by William Todd Scott · in Torque Game Engine · 02/26/2006 (10:46 am) · 1 replies
Hi,
I am trying to understand the code for ShapeBase objects and am a bit confused on script threads.
Specifically, if playAudio() is called from script then the code first verifies that the slot number is less than the constant MaxScriptThreads. The C++ code then adds the thread to the mSoundThread[] array.
If playThreads() is called from script the code also verifies that the slot number is less than the constant MaxScriptThreads. The C++ code then adds the thread to the mScriptThread[] array.
What I don't get here, is why, when playAudio() is called from script, do we verify that the slot number is less than MaxScriptThreads instead of MaxSoundThreads. It seems like, in this case, we should only be checking the MaxSoundThreads constant.
Thanks for the help.
Todd
I am trying to understand the code for ShapeBase objects and am a bit confused on script threads.
Specifically, if playAudio() is called from script then the code first verifies that the slot number is less than the constant MaxScriptThreads. The C++ code then adds the thread to the mSoundThread[] array.
If playThreads() is called from script the code also verifies that the slot number is less than the constant MaxScriptThreads. The C++ code then adds the thread to the mScriptThread[] array.
What I don't get here, is why, when playAudio() is called from script, do we verify that the slot number is less than MaxScriptThreads instead of MaxSoundThreads. It seems like, in this case, we should only be checking the MaxSoundThreads constant.
Thanks for the help.
Todd
Torque Owner William Todd Scott
The ShapeBase datablock preload() function looks for a sequence names "visibility" on the dts shape and eventually stores the sequence's ID in a variable called mHulkThread. This thread is activated when the ShapeBase object's damage state = 'Destroyed'.
I do not see this being used in the examples. Why is the sequence called visiblity and what is this generally used for?
Thanks
Todd