Beta 3: Animation Triggers Not Detected
by Robert DeMaria · in Torque Game Builder · 05/14/2006 (11:36 am) · 0 replies
ShowTool Pro detects the presence of animation triggers in a .dsq file, but the onAnimationTrigger callback is never fired when this animation is played in the game. The model and animation are properly displayed in the game. I'm using the following script to test the animation triggers:
Edit: This isn't actually a bug. In case anyone else wants to know, Torque won't detect animation triggers unless the bounding box of your shape has keyframes at the same time as the animation triggers.
datablock TSShapeConstructor(trigTestDTS)
{
baseShape = "~/data/shapes/trig_test/ed.dts";
sequence0 = "~/data/shapes/trig_test/ed.dsq stand";
};
$trigTest = new t2dShape3D()
{
scenegraph = t2dscene;
};
$trigTest.setShape("~/data/shapes/trig_test/ed.dts");
$trigTest.setTriggerActive(true);
$trigTest.playAnimation("stand");
$trigTest.setSize("40 40");
...
function t2dShape3D::onAnimationTrigger(%this,%triggerChannel)
{
echo("REACHING HERE!!!!");
}Edit: This isn't actually a bug. In case anyone else wants to know, Torque won't detect animation triggers unless the bounding box of your shape has keyframes at the same time as the animation triggers.