Author Topic: Explosion not showing for anyone but host  (Read 936 times)

Right, so I'm using an explosion Rkynick made for me and spawning it with the new Explosion(){}; command. It works for me, but for anyone else, it doesn't show up. Anything wrong with my code?

To make the explosion:
Code: [Select]
new Explosion(){
scale = "4 4 4";
position = %pos;
datablock = "HeatRocketExplosion";
};

The explosion datablocks:
Code: [Select]
datablock ParticleData(asplodeExplosionParticle)
{
dragCoefficient      = 5;
gravityCoefficient   = -0.2;
inheritedVelFactor   = 0.2;
constantAcceleration = 0.0;
lifetimeMS           = 1300;
lifetimeVarianceMS   = 200;
textureName          = "add-ons/particles/exp1";
spinSpeed = 4.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0]     = "0.9 0.8 0.3 0.5";
colors[1]     = "0.9 0.6 0.2 0.8";
colors[2]     = "0.3 0.4 0.5 0.3";
sizes[0]      = 1.0;
sizes[1]      = 3.0;
sizes[2]      = 5.0;

useInvAlpha = false;
};
datablock ParticleEmitterData(asplodeExplosionEmitter)
{
   ejectionPeriodMS = 21;
   periodVarianceMS = 0;
   ejectionVelocity = 7;
   velocityVariance = 0.5;
   ejectionOffset   = 0.2;
   thetaMin         = 85;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 320;
   overrideAdvance = false;
   particles = "asplodeExplosionParticle";
};
datablock ParticleData(asplodesparkExplosionParticle)
{
dragCoefficient      = 0;
gravityCoefficient   = 0.0;
inheritedVelFactor   = 0.5;
constantAcceleration = 0.9;
lifetimeMS           = 500;
lifetimeVarianceMS   = 200;
textureName          = "add-ons/particles/exp1spark";
spinSpeed = 0.1;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0]     = "0.9 0.7 0.3 0.7";
colors[1]     = "0.9 0.4 0.2 0.7";
colors[2]     = "0.3 0.5 0.5 0.4";
sizes[0]      = 0.8;
sizes[1]      = 0.7;
sizes[2]      = 0.5;

useInvAlpha = false;
};
datablock ParticleEmitterData(asplodesparkExplosionEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 8.6;
   velocityVariance = 8.5;
   ejectionOffset   = 0.1;
   thetaMin         = 45;
   thetaMax         = 90;
   phiReferenceVel  = 1;
   phiVariance      = 300;
   overrideAdvance = false;
   particles = "asplodesparkExplosionParticle";
};
datablock ExplosionData(HeatRocketExplosion)
{
   //explosionShape = "";
   explosionShape = "./shapes/explosionSphere1.dts";
soundProfile = rocketExplodeSound;

   lifeTimeMS = 550;

   particleEmitter = asplodesparkExplosionEmitter;
   particleDensity = 155;
   particleRadius = 0.1;

   emitter[0] = asplodeExplosionEmitter;
   emitter[1] = asplodesparkExplosionEmitter;
   emitter[2] = asplodeDebrisTrailEmitter;

   faceViewer     = false;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "3.0 10.0 3.0";
   camShakeDuration = 0.5;
   camShakeRadius = 20.0;

   // Dynamic light
   lightStartRadius = 5;
   lightEndRadius = 20;
   lightStartColor = "1 1 0 1";
   lightEndColor = "0 0 0 0";

   damageRadius = 3;
   radiusDamage = 100;

   impulseRadius = 6;
   impulseForce = 4000;
};

datablock ParticleData(asplodeDebrisTrailParticle)
{
dragCoefficient = 3.0;
windCoefficient = 0.0;
gravityCoefficient = -0.3;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1400;
lifetimeVarianceMS = 150;
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
useInvAlpha = true;
animateTexture = false;
//framesPerSec = 1;

textureName = "add-ons/particles/cloud";
//animTexName = "~/data/particles/cloud";

// Interpolation variables
colors[0] = "0.2 0.1 0.0 0.2";
colors[1] = "0.2 0.1 0.0 0.2";
   colors[2] = "0.2 0.1 0.0 0.1";

sizes[0] = 2.0;
sizes[1] = 4.0;
   sizes[2] = 5.0;

times[0] = 0.0;
times[1] = 0.1;
   times[2] = 7.0;
};

datablock ParticleEmitterData(asplodeDebrisTrailEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;
   ejectionVelocity = 4.9;
   velocityVariance = 4.8;
   ejectionOffset   = 1.0;
   thetaMin         = 40;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "asplodeDebrisTrailParticle";

   uiName = "asplode Debris Trail";
   emitterNode = FifthEmitterNode;
};

i remember badspot saying something about not being able to spawn explosions. i think what he did instead was create a projectile that explodes on death and has a lifetime of like 10ms.