Author Topic: Trouble Creating a Visible Projectile  (Read 389 times)

I'm clearly missing something here, but I don't know what that is.

I'm trying to create a Projectile which has a purplish emitter hanging in the air behind it, but there isn't actually a trail.

Code: [Select]
datablock ParticleData(DeathrayParticle)
{
dragCoefficient = 0;
gravityCoefficient = 0;
inheritedVelFactor = 0;
constantAcceleration = 0;
lifetimeMS = 500;
lifetimeVarianceMS = 0;
spinSpeed = 0;
spinRandomMin = 0;
spinRandomMax = 0;
textureName = "base/data/particles/cloud";
colors[0] = "0.6 0 1 1";
sizes[0] = 1;
times[0] = 0;
colors[1] = "0 0 0 0";
sizes[1] = 1;
times[1] = 1;
useInvAlpha = false;
};

datablock ParticleEmitterData(DeathrayEmitter)
{
lifetimeMS = 10000;
ejectionPeriodMS = 10;
particles = "DeathrayParticle";
};

datablock projectileData(DeathrayProjectile)
{
directDamageType = $DamageType::Deathray;
directDamage = 10000;
particleEmitter = DeathrayEmitter;
uiName = "";
};
« Last Edit: May 29, 2011, 08:07:07 PM by Xalos »


Your emitter is missing a ton of stuff, but that shouldn't really matter.

1. Change the emitter datablock to this
Code: [Select]
datablock ParticleEmitterData(DeathrayEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
lphiReferenceVel = 0;
lphiVariance = 360;
overrideAdvance = false;

particles = "DeathrayParticle";
};

2. Change "lifetimeMS" in DeathrayParticle to 10000 or whatever. There is no lifetimeMS property for an emitter.

3. Be ABSOLUTELY CERTAIN the following is in your image datablock:

   projectile = DeathrayProjectile;

Thanks, Iban! That made it visible, and it looks fabulous!

Also, there is no weapon; it's a fired spell. :P