Game Development Community

datablock TSShapeConstructor(PlayerDts) question

by JJ62(#0005) · in Torque Game Engine · 02/07/2009 (10:23 am) · 2 replies

Im pretty new to torque, so bear with me!!!
I have created a model of a block that I want to use in my game as the player character. It doesn't have any animation data. I go to the player.cs in the server folder and change the script from the default

datablock PlayerData(PlayerBody){
//other player properties
shapeFile = "~/data/shapes/player/player.dts";
}

to

datablock PlayerData(PlayerBody){
//other player properties
shapeFile = "~/data/shapes/player/block.dts";
}

The default player model had animation data also had this code

datablock TSShapeConstructor(PlayerDts)
{
baseShape = "~/data/shapes/player2/player.dts";
sequence0 = "~/data/shapes/player2/player_root.dsq root";
sequence1 = "~/data/shapes/player2/player_forward.dsq run";
sequence2 = "~/data/shapes/player2/player_back.dsq back";
}

My block.dts doesnt have animation data so I just commented this out. Every time I run the game it crashes. My question to you is, do you have the datablock TSShapeConstructor(PlayerDts) stuff? Can I not simple have a player datablock by itself that looks like

datablock PlayerData(PlayerBody)
{
renderFirstPerson = false;
shapeFile = "~/data/shapes/player1/block.dts";

cameraMaxDist = 3;
computeCRC = true;

canObserve = true;
cmdCategory = "Clients";

cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
};
without any of the animation stuff?

#1
02/07/2009 (12:27 pm)
You can I think if the animation stuff you removed is embedded in the DTS.
#2
02/07/2009 (1:12 pm)
I worded my last post incorrectly. I don't want to have any animations with my model. Is it a requirement that must have animation data to supply to torque? I trying to leave out this code

datablock TSShapeConstructor(PlayerDts)
{
baseShape = "~/data/shapes/player2/player.dts";
sequence0 = "~/data/shapes/player2/player_root.dsq root";
sequence1 = "~/data/shapes/player2/player_forward.dsq run";
sequence2 = "~/data/shapes/player2/player_back.dsq back";
}
but it doesn't seam to compile otherwise!