Blockland Forums > Modification Help
Trouble Creating a Visible Projectile
Pages: (1/1)
Xalos:
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: ---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 = "";
};
--- End code ---
RamRamRamRam:
wa? :panda:
Iban:
Your emitter is missing a ton of stuff, but that shouldn't really matter.
1. Change the emitter datablock to this
--- Code: ---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";
};
--- End code ---
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;
Xalos:
Thanks, Iban! That made it visible, and it looks fabulous!
Also, there is no weapon; it's a fired spell. :P
Pages: (1/1)