I need help on my explosion.

Author Topic: I need help on my explosion.  (Read 1046 times)

So I have this pizza add-on I made.

The trouble is I want the explosion for the throw to shake the screen and make a giant like yellow and red splat emitter.

How would I go about doing this?

datablock ExplosionData(gunExplosion)
{
   //explosionShape = "";
   soundProfile = bulletHitSound;

   lifeTimeMS = 150;

   //here is where particles are handled. your yellow splatter can go
   particleEmitter = gunExplosionEmitter; 
   particleDensity = 5; //change this number if you want more splatter
   particleRadius = 0.2;

   //this is the general emitter. its always attached to the base of the explosion. use this for rings or coronas and stuff
   emitter[0] = gunExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "1 1 1";
    
   //all this stuff controls the explosion camera shake
   shakeCamera = true;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   //debris stuff. use this for the other color of splatter you want
   debris = YourDebrisData;
   debrisThetaMin = 0;
   debrisThetaMax = 90; //90
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisNum = 6;
   debrisNumVariance = 2;
   debrisVelocity = 8;
   debrisVelocityVariance = 3;

   // Dynamic light
   lightStartRadius = 2;
   lightEndRadius = 2;
   lightStartColor = "0.5 0.8 0.9";
   lightEndColor = "0 0 0";
};

because there's only one 'particle' supported per explosion, you can only handle one of the two colors of splatter you want. however, you can utilize debris data for the other color, like maybe the red or whatever

datablock DebrisData(Whatever debris)
{
   emitters = "YourRedEmitterHere";

   shapeFile = "base/data/shapes/empty.dts";
   lifetime = 1;
   minSpinSpeed = -300.0;
   maxSpinSpeed = 300.0;
   elasticity = 0.01;
   friction = 0.2;
   numBounces = 0;
   staticOnMaxBounce = true;
   snapOnMaxBounce = false;
   fade = true;

   gravModifier = 3;
};
« Last Edit: April 04, 2018, 01:34:53 PM by thegoodperry »