Urgent: Need help with Triggers in DTS shapes
by Aisle 5 Games, Inc. · in Artist Corner · 06/17/2009 (4:05 pm) · 1 replies
I have an urgent need for help with setting up triggers for dts shapes. I was hoping someone can look at our dts file, dsq files, code and/or max file to see where I am going wrong. We are only days away from submitting our game to beta testing so any help is greatly appreciated.
I am exporting a character from 3DS Max using the DTS exporter tool. I set an initial sequence in the DTS file with a 'trigger 1' near the end of the animation. I then export various other sequences, all with triggers of 1 near the end of the animations. Here is a screenshot of the sequence information in ShowTools that indicate the triggers are being exported with the dsq files:

Our goal is to have the game engine call up a new random sequence each time it hits the 'trigger 1' that is embedded near the end of the current sequence. That way the character will continuously move and look like it is not repeating too much. The problem is that the callback for the trigger is not executing. Here is the code we are using to execute the callback for the triggers:
The code is never reaching the echo() that tells us that a trigger is found. It is important to note that about 3 months ago, we were experimenting with this to see if it would work, and it did. In fact, the character that I exported still works in the game engine. The triggers are recognized and it calls up the next animation. However, now I am trying to import all the remaining characters into the game and the process does not work for the new characters. This makes me believe that it is something with the export process. However, everything seems to be fine in the ShowTool.
I've been pulling my hair out for a couple of days trying to figure out where I went wrong. Our game is set up to go into beta testing in 5 days so I urgently need to get this working soon. While getting the 3D characters to work isn't vital to gameplay, it is vital to progressing the story along. I appreciate any help! Here is a link to our Max file and the dsq and dts files:
www.aisle5games.com/data/DTS/torqueExporterMax9-64bit.zip
Help us Obi Wan Kenobi, you're our only help!
I am exporting a character from 3DS Max using the DTS exporter tool. I set an initial sequence in the DTS file with a 'trigger 1' near the end of the animation. I then export various other sequences, all with triggers of 1 near the end of the animations. Here is a screenshot of the sequence information in ShowTools that indicate the triggers are being exported with the dsq files:

Our goal is to have the game engine call up a new random sequence each time it hits the 'trigger 1' that is embedded near the end of the current sequence. That way the character will continuously move and look like it is not repeating too much. The problem is that the callback for the trigger is not executing. Here is the code we are using to execute the callback for the triggers:
function addCharacter(%scenegraph, %anchor)
{
datablock TSShapeConstructor(char_blacksmithDTS)
{
baseShape = "game/data/shapes/areaC1/gardener.dts";
sequence0 = "game/data/shapes/areaC1/gardener_idle1.dsq gardener_idle1";
}
%scenegraph.CharacterA = new t2dShape3D(char_blacksmith) { scenegraph = %scenegraph; };
%scenegraph.CharacterA.setShape( "game/data/shapes/areaC1/gardener.dts");
%scenegraph.CharacterA.setposition(%anchor.getpositionX(), %anchor.getPositionY());
%scenegraph.CharacterA.setTriggerActive( true );
}
function t2dShape3D::onAnimationTrigger( %this, %triggerChannel )
{
echo( "Trigger on Object" SPC %this.getId() SPC "in channel" SPC %triggerChannel );
}The code is never reaching the echo() that tells us that a trigger is found. It is important to note that about 3 months ago, we were experimenting with this to see if it would work, and it did. In fact, the character that I exported still works in the game engine. The triggers are recognized and it calls up the next animation. However, now I am trying to import all the remaining characters into the game and the process does not work for the new characters. This makes me believe that it is something with the export process. However, everything seems to be fine in the ShowTool.
I've been pulling my hair out for a couple of days trying to figure out where I went wrong. Our game is set up to go into beta testing in 5 days so I urgently need to get this working soon. While getting the 3D characters to work isn't vital to gameplay, it is vital to progressing the story along. I appreciate any help! Here is a link to our Max file and the dsq and dts files:
www.aisle5games.com/data/DTS/torqueExporterMax9-64bit.zip
Help us Obi Wan Kenobi, you're our only help!
Aisle 5 Games, Inc.
Default Studio Name
www.garagegames.com/community/forums/viewthread/12991
Hopefully this will help anyone else that is having this problem.