Author Topic: Particles don't work till in game exec  (Read 767 times)

I made a gun with a cool trail particle, but the particle isn't right until I exec it in game, what's going on? And duh yes I already have it checked in add-ons menu.

You made a mistake somewhere, post the particles and console log.

Code: [Select]
datablock ParticleData(bulletTrailParticle)
{
dragCoefficient      = 5;
gravityCoefficient   = 0.0;
inheritedVelFactor   = 1.0;
constantAcceleration = 0.0;
lifetimeMS           = 1200;
lifetimeVarianceMS   = 1200;
textureName          = "base/data/particles/thinring";
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0]     = "0.3 0.3 0.9 0.4";
colors[1]     = "0.5 0.5 0.5 0.0";
sizes[0]      = 0.001;
sizes[1]      = 1.0;

useInvAlpha = false;
};
datablock ParticleEmitterData(bulletTrailEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 0.5;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "bulletTrailParticle";
};

This might cause problems:

Code: [Select]
sizes[0]      = 0.001;
Try to set it to 0 (same thing really), don't make long decimal digits. They tend to screw up for some reason.

If it still doesn't work then this might be doing it:

Code: [Select]
   thetaMax         = 0.5;
The engine might not like decimals in degree angles, try setting this as a whole number if the size[0] value change doesn't work.

You may also want to change the lifetimeVarianceMS to something less than the lifetimeMS, and rename the datablocks so they dont conflict with the gun.