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 ...
Also posted a link in the RTS Kit, but since its related to TGE ... cross posting here.
(sorry if offends anyone)
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)
About the author
Long time gamer, hacker and programmer. With dreams of making video games -
#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.
Torque Owner Rex
BrokeAss Games
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.