Game Development Community

how are footprints triggered in stock TGE ? ie mShapeInstance->getTriggerState()

by Jeff Yaskus · in Torque Game Engine · 02/26/2010 (10:43 pm) · 2 replies

I'm trying to (re)activate footprints in the modified RTS Kit ... which has them commented out to save FPS or such.

One thing I can't figure out is how they get "triggered" in stock TGE -- can anyone shed light on this ?

Specifically, the following code ... if (mShapeInstance->getTriggerState(1)) ... can find what/where these triggers are supposed to be "set" so I'm fudging it ...

if (isGhost())    
    {  
       bool triggeredLeft = false;  
       bool triggeredRight = false;  
       F32 offset = 0.0f;  
         
       if(mShapeInstance->getTriggerState(1))   
       {  
          triggeredLeft = true;  
          offset = -mDataBlock->decalOffset;  
          mShapeInstance->setTriggerState(2,true); // JY  
          mShapeInstance->setTriggerState(1,false); // JY - off  
       }  
       else if (mShapeInstance->getTriggerState(2))   
       {  
          triggeredRight = true;  
          offset = mDataBlock->decalOffset;  
          mShapeInstance->setTriggerState(2,false); // JY - off  
       }

Also posted a link in the RTS Kit, but since its related to TGE ... cross posting here.
(sorry if offends anyone)

#1
02/27/2010 (4:16 am)
The triggers are set in the DSQ file, used by the DTS shape and created by the DCC and exporters used.

With T3D and the "Shape Editor" you can add these triggers to the sequences, otherwise you'll have to go back to your art asset and re export the object.

...as for Source Code area...??? I'm not a programmer, an Artist.
#2
02/27/2010 (10:07 pm)
Thanks Rex - "Fudging" it seems to work well enough. I think the code will still let the DSQ triggers work if they exist as well.