Author Topic: Making a 3-D explosion  (Read 1813 times)

How do I make 3-D explosions when a bullet/projectile hits something? (i.e. like the one from the rocket launcher)  I made my own explosion using Milkshape but it won't appear when the weapon's projectile hits the ground.  The weapon script I used is based off of the regular gun script.

Here's the code I used for the explosion particle

Code: [Select]
datablock ExplosionData(IonCannonExplosion)
{
   //explosionShape = "";
   explosionShape = "./shapes/IonCannonLaserExplosion.dts";
soundProfile = IonCannonExplosionSound;

   lifeTimeMS = 500;

   particleEmitter = IonCannonExplosionEmitter;
   particleDensity = 100;
   particleRadius = 100;

   emitter[0] = IonCannonExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "10 10 10";

   shakeCamera = true;
   camShakeFreq = "34.0 38.0 34.0";
   camShakeAmp = "25.0 30.0 25.0";
   camShakeDuration = 2.0;
   camShakeRadius = 500.0;

   // Dynamic light
   lightStartRadius = 500;
   lightEndRadius = 300;
   lightStartColor = "1 1 1 1";
   lightEndColor = "0 0 0 0";

   damageRadius = 100;
   radiusDamage = 200;

   impulseRadius = 200;
   impulseForce = 15000;
};

First, try changing the shape to the rocket explosion and see if that works. If it doesn't, you've made a booboo in your datablock, if it does work, does your shape require animation?

If it does, make sure the animation is called ambient - as that will automatically be played when the shape is spawned.

Lastly, just spawn it as a Static using F11, to check that it is actually a working model.

Alright, yeah it was probably the size (as it's huge). While I'm fixing it, I have another question, how do you do scale change animations using milkshape? I just can't seem to get them to work.

I don't use milkshape so I couldn't say, Try googling it.

I don't use milkshape so I couldn't say, Try googling it.
then what do you use?

Changed the size, and nothing.

Does it matter that the explosion is made up of 2 spheres with different textures?