Game Development Community

Creating a Laser Projectile

by JD · in Torque 3D Professional · 07/14/2013 (5:16 am) · 21 replies

Ok I'm bringing it up! Laser Projectile, we need it!

This is what I'm working on but I'm not sure what to edit that could make it work correctly:

datablock ProjectileData(KralmokProjectile)
{
projectileShapeName = "art/shapes/weapons/SwarmGun/rocket.dts";
directDamage = 100;
radiusDamage = 0;
damageRadius = 0;
areaImpulse = 2500;

explosion = RocketLauncherExplosion;
waterExplosion = RocketLauncherWaterExplosion;

decal = ScorchRXDecal;
splash = RocketSplash;

particleEmitter = Laser1TrailEmitter;
particleWaterEmitter = RocketTrailWaterEmitter;

muzzleVelocity = 100;
velInheritFactor = 0.3;

armingDelay = 0;
lifetime = 5000; //(500m / 100m/s = 5000ms)
fadeDelay = 4500;

bounceElasticity = 0;
bounceFriction = 0;
isBallistic = false;
gravityMod = 0.80;

lightDesc = KralmokLightDesc;

damageType = "RocketDamage";
};

datablock LightDescription(KralmokLightDesc)
{
range = 50.0;
color = "2 3 3";
brightness = 15.0;
animationType = PulseLightAnim;
animationPeriod = 8.25;
//flareType = SimpleLightFlare0;
};

datablock ParticleData(Laser1Trail)
{
textureName = "art/shapes/particles/beam_blue";
dragCoeffiecient = 0;
gravityCoefficient = -0.202686;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 750;
lifetimeVarianceMS = 749;
useInvAlpha = true;
spinRandomMin = -60;
spinRandomMax = 0;
spinSpeed = 1;

colors[0] = "0.3 0.3 0.3 0.598425";
colors[1] = "0.9 0.9 0.9 0.897638";
colors[2] = "0.9 0.9 0.9 0";

sizes[0] = 0.247207;
sizes[1] = 0.497467;
sizes[2] = 0.747726;

times[0] = 0.0;
times[1] = 0.4;
times[2] = 1.0;
animTexName = "art/shapes/particles/beam_blue";
times[3] = "1";
};

datablock ParticleEmitterData(Laser1TrailEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 0.75;
velocityVariance = 0;
thetaMin = 0.0;
thetaMax = 0.0;
phiReferenceVel = 90;
phiVariance = 0;
particles = "Laser1Trail";
};
datablock ParticleData(Laser1TrailParticle)
{
textureName = "art/shapes/particles/impact";
dragCoeffiecient = 0;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1200;//1000;
lifetimeVarianceMS = 299;//500;
useInvAlpha = true;//false;
spinSpeed = 1;
spinRandomMin = -300.0;
spinRandomMax = 0;
colors[0] = "1 0.897638 0.795276 0.4";
colors[1] = "0.795276 0.795276 0.795276 0.6";
colors[2] = "0 0 0 0";
sizes[0] = 0.5;//1.0;
sizes[1] = 2;
sizes[2] = 1;//1.0;
times[0] = 0.0;
times[1] = 0.498039;
times[2] = 1.0;
animTexName = "art/shapes/particles/impact";
times[3] = "1";
};

About the author

Check out my website: http://lethonline.com/ *a home for all gamers!*

Page«First 1 2 Next»
#21
07/16/2013 (10:08 pm)
@Steve,
IIRC you can set the actual color of the bolt white, and just use the color to adjust the color of the bolt. That way you don't have to use extra textures. Of course I was using TGE so that may have changed. With shaders that does change things a bit.

@Michael,
Nice link. I almost forgot about those gems.
Page«First 1 2 Next»