Author Topic: Particle Grows Last Second [Solved]  (Read 628 times)

Alright, so I just wanted to make an emitter that resembles the Laser A emitter, but lasts way longer.
I used tree(); to get all the datablock fields of Laser A, and replicated them onto my own emitter, but made the particle lifetime way longer and changed the time fields proportionally. Here's the code:
Code: [Select]
datablock ParticleData(LaserBParticle)
{
dragCoefficient      = 0;
gravityCoefficient   = 0;
inheritedVelFactor   = 0;
windCoefficient      = 0;
constantAcceleration = 0;
lifetimeMS           = 16000;
lifetimeVarianceMS   = 0;
textureName          = "base/data/particles/dot";
spinSpeed = 1;
spinRandomMin = -90;
spinRandomMax = 90;

colors[0]     = "1 0 0 0.8";
colors[1]     = "1 0 0 0.7";
colors[2]     = "1 1 1 0.3";
colors[3]     = "1 1 1 0.3";

sizes[0]      = 0.0976622;
sizes[1]      = 0.0976622;
sizes[2]      = 0.0976622;
sizes[3]      = 0.0976622;

times[0]      = 11.4948974;
times[1]      = 12.8;
times[2]      = 16;
times[3]      = 16.1;

useInvAlpha = false;
};
datablock ParticleEmitterData(LaserBEmitter)
{
   ejectionPeriodMS = 8;
   periodVarianceMS = 0;
   ejectionVelocity = 6;
   velocityVariance = 0.0;
   ejectionOffset   = 0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = false;
   orientParticles = false;
   particles = "LaserBParticle";

   useEmitterColors = true;

   uiName = "Laser B";
};
It worked fine at first, exactly how I wanted it. Now though, a bug has just recently started occurring. In the final second of the particles lifetime, if grows abnormally large. I haven't edited the code at all, yet it just started doing this. The problem is fixed when I re-exec the file with the emitter in it, but I don't want to have to do that every time I host my server... I did download Muffin's Weather Emitters, but I don't think that is the problem. If anyone has a solution or knows if this is some bug in V14, please let me know. Thanks!

Here are pictures of what it looks like with the bug and the posted code running:
« Last Edit: March 04, 2010, 09:23:00 PM by lilboarder32 »

Turns out I was mixed up on the times fields. They can only be between 0 and 1 and are relative to the lifetime. I thought it was the amount of seconds it occurs in the lifetime.

datablock ParticleData(LaserBParticle : LaserAParticle)
{
        //fields you want to modify
};

datablock ParticleData(LaserBParticle : LaserAParticle)
{
        //fields you want to modify
};
Doh, well, too late now.  :cookieMonster:
Thanks anyway