Author Topic: Weapon As Particles.  (Read 1478 times)

Yeah well i tryed mixing an emote and weapon together so that the person's hands on fire everytime they mount the weapon but it didnt work lol, how would i do that, heres what i done:

Code: [Select]
datablock ParticleData(FireSpellTrailParticle)
{
dragCoefficient = 3.0;
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 = "base/data/particles/dot";
//animTexName = "~/data/particles/dot";

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

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

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

   ejectionOffset = 0;

   thetaMin         = 0.0;
   thetaMax         = 90.0; 

   particles = FireSpellTrailParticle;
};

//effects
datablock ParticleData(FireSpellExplosionParticle)
{
dragCoefficient      = 5;
gravityCoefficient   = 0.1;
inheritedVelFactor   = 0.2;
constantAcceleration = 0.0;
lifetimeMS           = 500;
lifetimeVarianceMS   = 200;
textureName          = "base/data/particles/bubble";
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0]     = "0.0 0.9 0.0 0.9";
colors[1]     = "0.0 0.5 0.0 0.0";
sizes[0]      = 0.35;
sizes[1]      = 0.0;
};

datablock ParticleEmitterData(FireSpellExplosionEmitter)
{
   ejectionPeriodMS = 7;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "FireSpellExplosionParticle";
};

datablock ExplosionData(FireSpellExplosion)
{
   //explosionShape = "";
soundProfile = arrowExplosionSound;

   lifeTimeMS = 150;

   particleEmitter = FireSpellExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 2;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";
};

AddDamageType("FireSpellDirect",   '<bitmap:add-ons/ci/arrow> %1',    '%2 <bitmap:add-ons/ci/arrow> %1',1,1);

datablock ProjectileData(FireSpellProjectile)
{
   projectileShapeName = "./shapes/empty.dts";

   directDamage        = 45;
   directDamageType    = $DamageType::FireSpellDirect;

   radiusDamage        = 0;
   damageRadius        = 0;
   radiusDamageType    = $DamageType::FireSpellDirect;

   explosion           = FireSpellExplosion;
   particleEmitter     = FireSpellTrailEmitter;

   muzzleVelocity      = 65;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = true;
   gravityMod = 0.25;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};


//////////
// item //
//////////
datablock ItemData(FireSpellItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "./shapes/empty.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "Fire Spell";
iconName = "";
doColorShift = false;
colorShiftColor = "0 1 0 1.000";

// Dynamic properties defined by the scripts
image = FireSpellImage;
canDrop = true;
};

datablock ParticleData(FireHand)
{
textureName          = "base/data/particles/cloud";
dragCoefficient      = 0.0;
gravityCoefficient   = -0.7;
inheritedVelFactor   = 0.0;
windCoefficient      = 0;
constantAcceleration = 0.0;
spinSpeed     = 0;
spinRandomMin = -90.0;
spinRandomMax =  90.0;
useInvAlpha   = false;

colors[0] = "1   1   0.3 0.0";
colors[1] = "1   1   0.3 1.0";
colors[2] = "0.6 0.0 0.0 0.0";

sizes[0] = 0.0;
sizes[1] = 1.0;
sizes[2] = 0.6;
};

datablock ParticleEmitterData(FireHandEmitter)
{
   ejectionPeriodMS = 14;
   periodVarianceMS = 4;
   ejectionVelocity = 0.0;
   ejectionOffset   = 0.40;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 180;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = FireHand;   
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(FireSpellImage)
{
   shapeFile = "base/data/shapes/empty.dts";
emap = false;

mountPoint = $RHandSlot;
   rotation = "1 0 0 -90";

stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = False;
stateEmitter[1] = FireHandEmitter;

stateName[2] = "Done";
stateScript[2] = "onDone";
};

Take note i havent edited everything yet i've been trying to get the fire to come out the persons hand then ill work on the particles.

er... may i ask where the states are?