Game Development Community

How to import the shape in to torque engine by coding

by Manikandan · in Torque Game Engine · 09/11/2007 (2:07 am) · 1 replies

Hi all...


Actually iam new to toque engine...Now iam trying to develop a game using torque script...i dont know
how to load a shape by torque script coding...any one can u help me...send the coding for to load the shape in the torque engine....


Thanks in advance...

#1
09/11/2007 (2:25 am)
Here are the basics:
datablock StaticShapeData(yourShape)
{
   shapeFile = "~/data/shapes/yourShape.dts";
};

function spawnShape()
{
   // Create a new shape (placed at center of world)
   %shape = new StaticShape()
   {
      dataBlock = yourShape;
   };

   %shape.setTransform("0 0 300 1 0 0 0");
   MissionCleanup.add(%shape);
}