Author Topic: how do I make a emmiter  (Read 1077 times)

how do I make a emmiter? case I dont know how                                                  :nes:

Open up a dang script and look at it. It's really not that hard.

Code: [Select]
datablock ParticleData(gunFlashParticle) //Opens up the datablock and gives it a basic name, gunFlashParticle.
{
dragCoefficient      = 3; //How quickly it slows down over time.
gravityCoefficient   = -0.5; //How much it weighs. Positive values sink, negative values float/
inheritedVelFactor   = 0.2; //How much velocity it inherits from its emitter. If the emitter was on a bullet going at speed 100, it would inherit 20 speed.
constantAcceleration = 0.0; //How much it speeds up over time.
lifetimeMS           = 25; //How long it lives before disappearing.
lifetimeVarianceMS   = 15; //The random part of lifetime variance. For 25 lifetime and 15 variance, the actual lifetime could be anywhere from 10 to 40 milliseconds.
textureName          = "base/data/particles/star1"; //The shape it uses.
spinSpeed = 10.0; //How quickly it always spins.
spinRandomMin = -500.0; //The minimum random spin speed.
spinRandomMax = 500.0; //The maximum random spin speed.
colors[0]     = "0.9 0.9 0.0 0.9"; //The colors when it is emitted.
colors[1]     = "0.9 0.5 0.0 0.0"; //The color when it dies.
sizes[0]      = 0.5; //The size when it is emitted.
sizes[1]      = 1.0; //The size when it dies.

useInvAlpha = false; //Whether or not the particle will "glow". Try playing around with this and you'll get what I mean.
};
datablock ParticleEmitterData(gunFlashEmitter) //Opens the emitter and names it, gunFlashEmitter.
{
   ejectionPeriodMS = 3; //How long in milliseconds it waits before emitting another particle.
   periodVarianceMS = 0; //The randomization of the ejectionPeriod. This is pretty useless for most emitters.
   ejectionVelocity = 1.0; //How much speed a particle has when it is ejected.
   velocityVariance = 1.0; //The randomization of the velocity.
   ejectionOffset   = 0.0; //The radius of the sphere it is emitted from. Leave to 0 for no sphere.
   thetaMin         = 0; //The minimum theta, or longitude, of the particle's spawn sphere.
   thetaMax         = 90; //The mazimum theta, or longitude, of the particle's spawn sphere.
   phiReferenceVel  = 0; //How quickly the latitude of the particle's spawn sphere rotates.
   phiVariance      = 360; //The degrees of the particle's spawn sphere's latitude.
   overrideAdvance = false; //Dunno what this does
   particles = "gunFlashParticle"; //The particle it uses

   uiName = "Gun Flash"; //The name you use to select it on a brick, take this line out and you won't be able to use it on a brick
};