Game Development Community

Animation doesn't play.

by Maddermadcat · in Torque Game Engine · 03/30/2007 (9:05 am) · 5 replies

I followed the instructions on a TDN article, and still, my test object's animation refuses to play for some reason. Here's my code (really simple):

/////////////////////////////////////////////////////
//BIG PUMP THING! =C/////////////////////////////////
/////////////////////////////////////////////////////

datablock StaticShapeData(GiantPipeThing)
{
   category = "Scenery";
   ClassName = "StaticShapeData";
   shapeFile = "~/data/shapes/Scenery/giantpump.DTS";
};

function GiantPipeThing::onAdd(%data, %obj)
{
   %obj.playThread(0,"pump");
}

The animation's filename is giantpump_pump, which should work according to the article... What am I doing wrong?

#1
03/30/2007 (9:42 am)
Your scripts seem fine to me.

Hmm see if you can load the model in the Show Tool to check that the animation is there and can be played. Maybe it's an exporting problem?

I'd be happy to have a look at your DTS file.

--Amr
#2
03/30/2007 (2:08 pm)
It's not working in the show tool, either... I got animations to play before, have I forgotten to do something? I'm using the Dark Industries 3ds Max exporter, by the way.
#3
03/30/2007 (4:59 pm)
Looks like the issue is with exporting your animation then. I'm afraid I don't use MAX so I can't help you with that. My advice is have another look at your model, and check the exporting instructions.

--Amr
#4
03/31/2007 (1:13 am)
Maddermadcat,
first, check what dump.dmp file says (it's generated in the same folder where you export your model to).
Open this file with any text editor (e.g. notepad) and find line
Adding X sequences...
It's almost at the end of file. Actually, check whole file to catch any problems that you could have.

Another point here could be, if you use DTS file as a model and DSQ as a sequence, then you need to tell engine that .dsq file is a part of .dts:
datablock TSShapeConstructor(a_grizzlyDTS)
{
   baseShape = "starter.fps/data/shapes/player/myCustomPlayer.dts";
   sequence0 = "starter.fps/data/shapes/player/myCoolAnimation.dsq pump";
............
};

In ShowToolPro, when you load DTS, you can load also DSQ files after it and play them.
But, if you say that "got ani to play before", I can assume that something went wrong with the export.
Check the dump.dmp file. Most of the times it something really simple.

Good luck.
#5
04/02/2007 (6:28 pm)
At the end of the dump file it says "adding 0 sequences..."

Why doesn't the sequence export? I'm using the Dark Industries exporter and 3ds max.