The smoke only emits from the barrel of my gun once the fire animation has completed.
help me
datablock ParticleData(EokaSmokeParticle)
{
dragCoefficient = 13;
gravityCoefficient = 0;
inheritedVelFactor = 4;
constantAcceleration = 4;
lifetimeMS = 525;
lifetimeVarianceMS = 55;
textureName = "base/data/particles/cloud";
spinSpeed = 5.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0.5 0.5 0.5 0.9";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.2;
sizes[1] = 0.4;
useInvAlpha = false;
};
datablock ParticleEmitterData(EokaSmokeEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "EokaSmokeParticle";
uiName = "Eoka Smoke";
};
datablock ShapeBaseImageData(EokaadsImage)
{
// Basic Item properties
shapeFile = "./Models/Eoka.dts"; //If you use two-handed weapons, this is what would have two hands
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 0;
offset = "0 0 0";
eyeOffset = "0.35 0.9 -0.7"; //"0.7 1.2 -0.5";
rotation = eulerToMatrix( "0 0 0" );
// When firing from a point offset from the eye, muzzle correction
// will adjust the muzzle vector to point to the eye LOS point.
// Since this weapon doesn't actually fire from the muzzle point,
// we need to turn this off.
correctMuzzleVector = true;
// Add the WeaponImage namespace as a parent, WeaponImage namespace
// provides some hooks into the inventory system.
className = "WeaponImage";
// Projectile && Ammo.
item = BowItem;
ammo = " ";
projectile = EokaProjectile;
projectileType = Projectile;
casing = EokaShellDebris; //Don't mess with these too much
shellExitDir = "1.0 -1.3 1.0";
shellExitOffset = "0 0 0";
shellExitVariance = 15.0;
shellVelocity = 7.0;
//melee particles shoot from eye node for consistancy
melee = false;
//raise your arm up or not
armReady = true;
doColorShift = true;
colorShiftColor = EokaItem.colorShiftColor;//"0.400 0.196 0 1.000";
//casing = " ";
// Images have a state system which controls how the animations
// are run, which sounds are played, script callbacks, etc. This
// state system is downloaded to the client so that clients can
// predict state changes and animate accordingly. The following
// system supports basic ready->fire->reload transitions as
// well as a no-ammo->dryfire idle state.
// Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.15;
stateTransitionOnTimeout[0] = "Ready";
stateSequence[1] = "Equip"; //Optional if you want an equip animation
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateSequence[1] = "Ready";
stateName[2] = "Fire";
stateTransitionOnTimeout[2] = "Smoke";
stateTimeoutValue[2] = 1; //Delay between each shot, the smaller the number, the less of a delay. Fast machine guns would have a small number.
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire"; //When you make a custom fire animation, place the name here
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = EokaFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = EokaShot1Sound;
stateEjectShell[2] = true;
stateName[3] = "Smoke";
stateEmitter[3] = EokaSmokeEmitter;
stateEmitterTime[3] = 0.05;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3] = 0.01;
stateTransitionOnTimeout[3] = "Reload";
stateName[4] = "Reload";
stateSequence[4] = "Reload";
stateTransitionOnTriggerUp[4] = "Ready"; //This is what determins firemode, "TriggerUp" = SemiAuto, "Timeout" = Auto
stateSequence[4] = "Ready"; //so "stateTransitionOnTimeout[4], used to be "stateTransitionOnTriggerUp".
};