Game Development Community

Multiple sequences, one DSQ - not working

by Flashback · in Torque 3D Professional · 03/15/2010 (6:52 am) · 1 replies

Good day, everyone.

The thread title already says a lot, I believe, but here is the more detailed explanation, with examples.
Let's assume we've got the next files:

man.dts
man.cs
DSQs/anim_pack1.dsq
DSQs/anim_pack2.dsq
...

anim_packX.dsq files contain a bunch of sequences each, which worked fine with TGE. They're hooked up with the TSShapeConstructor. In man.cs:

singleton TSShapeConstructor(ManDTS)
{
   baseShape = "./man.dts";
   sequence0 = "./DSQs/anim_pack1.dsq";
   sequence1 = "./DSQs/anim_pack2.dsq";
};

So, PROBLEM #1

If I don't specify a name for animation, like
sequence0 = "./DSQs/anim_pack1.dsq [i]some_name[/i]";

... T3D crashes. Needless to say, if I have something like 20 sequences in a DSQ file, I don't want to rename anything, and intend to keep all the sequence names as they were exported. I've investigated why it crashes and can post my solution if needed. Will keep it out of this post, though, to avoid cluttering it with code.

PROBLEM #2, really important one

If there is only one sequence in your DSQ file, it's OK. If there are several, you're in trouble. After TSShapeConstructor does its work, and the animation is played, you can expect to see things like these:

www.irontowerstudio.com/misc/horror1.jpg
www.irontowerstudio.com/misc/horror2.jpg
These would work fine for a horror game, of course... =) But they were normal ambient and walking animations... in TGE days.

So, why am I writing this post? I hope that someone who faced this issue, or GarageGames developers, responsible for these changes could give me a hint on what do to with this, so I don't have to dig TSShape/importSequences/addSequence/etc code for hours or days.

#1
03/17/2010 (5:48 am)
To those who will face something like this in the future, the problem was solved by compiling a new version of max2dts exporter and re-exporting both shape and sequences.

If you didn't modify the source code of your exporter, you can just download a new build, prepared by Hewster or Eb, check this thread.

If you have to recompile manually, like I did, this resource can give you enough hints.