About TGE 1.52 Import animation files problem
by WuDalong · in Torque Game Engine · 10/02/2011 (2:59 am) · 5 replies
I made a model, but it has animation. Is a windmill model.
I export it as a DTS file, you can see the animation in TorqueShowToolPro.
But do not see in the TGE. Why is that?
I use Maya 6.0 + TGE 1.52
I export it as a DTS file, you can see the animation in TorqueShowToolPro.
But do not see in the TGE. Why is that?
I use Maya 6.0 + TGE 1.52
#2
=========================================================================
datablock StaticShapeData(Windmill)
{
category = "Misc";
shapeFile = "~/tuts/Windmill.dts";
};
function Windmill::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
=========================================================================
Is not my script errors?
10/03/2011 (7:43 am)
I created this script, but still does not show animation.=========================================================================
datablock StaticShapeData(Windmill)
{
category = "Misc";
shapeFile = "~/tuts/Windmill.dts";
};
function Windmill::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
=========================================================================
Is not my script errors?
#3
What is the actual 'internal' name you have given to the sequence? Is it 'action'? or some other name... How are you getting "Action" as the 'internal' name of the sequence. You can also use the TSShapeConstructor object, to change the name of a sequence. Read up on that object: the TSShapeConstructor object in the Documentation, it's really useful! The T3D version, of the TSShapeConstructor object, has tremendously expanded functions for the construct...with 1.5.2; you can at least 'rename' the sequence. Look at the default 'player' object, "KORK", and it's 'player.cs' script with the art asset to see how the TSShapeConstructor is being used back in 1.5.2.
... you now seem to 'get' the idea of scripting to activate game mechanics!!
Ah, is the script even being 'exec'd'....you need to make certain the script is compiling!!! IE, how are you executing the script? As the sequences don't run without scripting; the same holds true for executing the script itself; it needs a tad more scripting[just an added line]...if that is the case.
Good luck!
HHHmm....on second thought[it is late in the evening], since you are 'embedding' the sequence in the DTS obejct directly; you will have to make certain, during the export process, you are naming the sequence correctly. Take a look at the DTS in the ShowToolPro and get the name of the sequence from there. I can't remember if you can alter a DTS sequence 'name' once it's embedded. If you are using the correct name from the DTS shape...not quite sure why it's not playing with it being added to the mission?!?
10/04/2011 (2:13 am)
%obj.playThread(0,"Action");
What is the actual 'internal' name you have given to the sequence? Is it 'action'? or some other name... How are you getting "Action" as the 'internal' name of the sequence. You can also use the TSShapeConstructor object, to change the name of a sequence. Read up on that object: the TSShapeConstructor object in the Documentation, it's really useful! The T3D version, of the TSShapeConstructor object, has tremendously expanded functions for the construct...with 1.5.2; you can at least 'rename' the sequence. Look at the default 'player' object, "KORK", and it's 'player.cs' script with the art asset to see how the TSShapeConstructor is being used back in 1.5.2.
... you now seem to 'get' the idea of scripting to activate game mechanics!!
Ah, is the script even being 'exec'd'....you need to make certain the script is compiling!!! IE, how are you executing the script? As the sequences don't run without scripting; the same holds true for executing the script itself; it needs a tad more scripting[just an added line]...if that is the case.
Good luck!
HHHmm....on second thought[it is late in the evening], since you are 'embedding' the sequence in the DTS obejct directly; you will have to make certain, during the export process, you are naming the sequence correctly. Take a look at the DTS in the ShowToolPro and get the name of the sequence from there. I can't remember if you can alter a DTS sequence 'name' once it's embedded. If you are using the correct name from the DTS shape...not quite sure why it's not playing with it being added to the mission?!?
#4
The windmill issue is resolved.
Here you can see the effect
http://v.youku.com/v_show/id_XMzEwOTIzOTIw.html
or
http://player.youku.com/player.php/sid/XMzEwOTIzOTIw/v.swf
Thank you very much!
10/08/2011 (7:36 am)
Sorry, these days my computer out some problems.Thank you for your help!The windmill issue is resolved.
Here you can see the effect
http://v.youku.com/v_show/id_XMzEwOTIzOTIw.html
or
http://player.youku.com/player.php/sid/XMzEwOTIzOTIw/v.swf
Thank you very much!
#5
Keep up the good work!
10/09/2011 (3:44 am)
I watched your video link, WuDalong; good job! Glad you got it sorted, :).Keep up the good work!
Torque Owner Rex
BrokeAss Games