Author Topic: Skiddie Question: Trail Particles  (Read 512 times)

I suck at scripting, there's no doubt about that. But I need help getting a trail particle to work. When I get into the game, the weapon loads and its usable, but no trail is there. I added all the datablocks I need.... I think.



Problem highlighted

If someone else has had this problem and was able to fix it due to a simple error, please enlighten me. Thanks a bunch.

are you using a particle emitter datablock for the trail or a particle datablock

I'm a skiddie, I pretty much copy-pasted two blocks of code from the bow script, edited some words, and added M1PredatorTrailParticle into the little section where it asks for the datablock name. I can't access the script atm (on iPhone, I'll post code tomorrow).

Post the Weapon_M1Predator.cs file. Also, I don't think you understand what a script kiddy is.

Here's the thing I slapped in:

Code: [Select]
datablock ParticleData(M1PredatorTrailParticle)
{
dragCoefficient = 1.7;
windCoefficient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 200;
lifetimeVarianceMS = 0;
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
useInvAlpha = false;
animateTexture = false;
//framesPerSec = 1;

textureName = "./bulletTrail.png";

// Interpolation variables
colors[0] = "1 1 1 0.2";
colors[1] = "1 1 1 0.0";
sizes[0] = 0.2;
sizes[1] = 0.01;
times[0] = 0.0;
times[1] = 1.0;
};

datablock ParticleEmitterData(M1PredatorTrailEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;

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

   ejectionOffset = 0;

   thetaMin         = 0.0;
   thetaMax         = 90.0; 

   particles = M1PredatorTrailParticle;

   useEmitterColors = true;
   uiName = "M1Predator Trail";
};

and then I added the name to

Code: [Select]
particleEmitter     = "M1PredatorTrailParticle";
is Emitter supposed to be where Particle is in the second code here?