Blockland Forums > Modification Help

More than one Particle

Pages: (1/3) > >>

Khain:

Just a little doubt, can you put more than one particle for a emmiter?

Like:


--- Code: ---datablock ParticleEmitterData(Unusual_BullpupTrailEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;

   ejectionVelocity = 0; //0.25;
   velocityVariance = 0; //0.10;

   ejectionOffset = 0;

   thetaMin         = 0.0;
   thetaMax         = 90.0; 

   particles = Unusual_BullpupTrailParticle
   particles[2] = Unusual_BullpupTrailParticle2

   useEmitterColors = true;
};
--- End code ---
Thanks.

lordician:


--- Quote from: Khain on October 31, 2010, 07:44:28 PM ---Just a little doubt, can you put more than one particle for a emmiter?

Like:


--- Code: ---datablock ParticleEmitterData(Unusual_BullpupTrailEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;

   ejectionVelocity = 0; //0.25;
   velocityVariance = 0; //0.10;

   ejectionOffset = 0;

   thetaMin         = 0.0;
   thetaMax         = 90.0; 

   particles = Unusual_BullpupTrailParticle
   particles[2] = Unusual_BullpupTrailParticle2

   useEmitterColors = true;
};
--- End code ---
Thanks.

--- End quote ---
As far as i know, not like that.
However, i noticed the following in the torque reference guide:

--- Quote from:  Torque reference guide "Particle Emitter Data, Particle" ---String containing a tab-delimited list of ParticleData datablock names. When a
particle is emitted from the emitter, its datablock is randomly selected from the
list of valid datablocks supplied in the particles field string. The string must be
non-empty and at least one token must evaluate to a valid ParticleData datablock
name. String must also be less than 256 characters long. If either of these
conditions is not met, a console warning will be produced and the datablock's
onAdd() method will fail.

--- End quote ---
So probably, you could use:
   particles = "Unusual_BullpupTrailParticle   Unusual_BullpupTrailParticle2";
Note that i haven't tested the above statement.
Also don't forget about the last character on the above line (;), as i noticed you missed that in your code you pasted.

Khain:

Thanks, i'll try it!

lordician:


--- Quote from: Khain on November 01, 2010, 08:32:59 AM ---Thanks, i'll try it!

--- End quote ---
Inform me of the result, i am not happy with my answer as i haven't tested it. :C

Khain:


--- Quote from: lordician on November 01, 2010, 07:10:46 PM ---Inform me of the result, i am not happy with my answer as i haven't tested it. :C

--- End quote ---
Didn't work. :C

Pages: (1/3) > >>

Go to full version