Game Development Community

DTS Based Explosions

by QSquid · in Torque Game Engine Advanced · 04/26/2007 (1:44 pm) · 1 replies

Hello, could somone point me to a resource on the correct usage of the explosionShape property when creating an DTS Shape explosion. The main reason I ask is because I notice there is a playSpeed setting as well which i assume is for some sort of explosion animation for the DTS shape you are using, but I cannot find any resources on what this animation should be named etc... if anyone has a good resource or example code that would be great!

Here is the explosion datablock i am testing with
datablock ExplosionData(TestExplosion)
{	
   explosionShape = "~/data/shapes/weapons/explosion.dts";	
   playSpeed = 1;	
   faceViewer = true;   	
   shakeCamera = false;
};

Here is the code I am using to create the explosion
%exp = new Explosion() {
      dataBlock = "TestExplosion";
      position = %pos;
   };
   
   // Add shockwave to mission cleanup
   MissionCleanup.add(%exp );

#1
05/07/2007 (5:11 am)
In your DTS shape you use as the explosion you can have an animation called "ambient". So lets say you want your Explosion to be 4 seconds long, and your ambient animation (from Start to End) is 4 seconds, then playspeed is 1.

To see how to give your animation a name, refer to the documents as they are different for tools used.

This is how a shockwave effect can also be achieved.

Hope that helps... Show us a little pic or video... Havent reached the milestone in my own project to test different explosions.