Author Topic: Tool_Flashlight Help  (Read 724 times)

Well, apparently it refuses to execute because there seems to be a syntax error on Line 154, but i don't know where. I've marked where the 'pound' signs are too.

Code: [Select]
// | Name: Flashlight
// | Author(s): Psycho & Amade
// | Version: 1.0

datablock ParticleData(FlashlightExplosionParticle)
{
dragCoefficient      = 0;
gravityCoefficient   = 0;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.0;
lifetimeMS           = 10;
lifetimeVarianceMS   = 0;
textureName          = "";
spinSpeed = 0;
spinRandomMin = 0;
spinRandomMax = 0;
colors[0]     = "0.9 0.9 0.9 0.5";
sizes[0]      = 1.00;

useInvAlpha = true;
};

datablock ParticleEmitterData(FlashlightExplosionEmitter)
{
   ejectionPeriodMS = 0;
   periodVarianceMS = 0;
   ejectionVelocity = 0;
   velocityVariance = 0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = false;
   particles = "FlashlightExplosionParticle";

   useEmitterColors = true;
};

datablock ExplosionData(FlashlightExplosion)
{
   lifeTimeMS = 150;

   particleEmitter = FlashlightExplosionEmitter;
   particleDensity = 5;
   particleRadius = 0.2;

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

datablock ProjectileData(FlashlightProjectile)
{
   projectileShapeName = "";
   directDamage        = 0;
   directDamageType    = $DamageType::Flashlight;
   radiusDamageType    = $DamageType::Flashlight;

   brickExplosionRadius = 0;
   brickExplosionImpact = false;

   impactImpulse      = 400;
   verticalImpulse   = 400;
   explosion           = FlashlightExplosion;
   particleEmitter     = "";

   muzzleVelocity      = 200;
   velInheritFactor    = 1;

   armingDelay         = 00;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = false;
   gravityMod = 0.0;

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

datablock ItemData(FlashlightItem)
{
category = "Weapon";
className = "Weapon";

shapeFile = "./flashlight.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

uiName = "Flashlight";
iconName = "./icon_flashlight";
doColorShift = false;

image = flashlightImage;
canDrop = true;
};

datablock ShapeBaseImageData(FlashlightImage)
{
raycastWeaponRange = 50;
raycastWeaponTargets = ($TypeMasks::FxBrickObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::VehicleObjectType);
raycastDirectDamage = 0;
raycastDirectDamageType = $DamageType::Flashlight;
raycastExplosionProjectile = FlashlightProjectile;

   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0;
   rotation = eulerToMatrix( "0 0 0" );

   correctMuzzleVector = true;

   className = "WeaponImage";

   item = BowItem;
   ammo = " ";
   projectile = flashlightProjectile;
   projectileType = Projectile;

   melee = false;

   armReady = true;

   doColorShift = true;
   colorShiftColor = flashlightItem.colorShiftColor;

stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "Ready";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "Ready";
    stateSound[0] = weaponSwitchSound;

stateName[1] = "Ready";
stateSequence[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";

stateName[2] = "Fire";
stateSequence[2] = "Fire";
stateTransitionOnTimeout[2] = "Reload";
    stateWaitForTimeout[2] = true; //stuff from console starts below.
          ^stateTimeoutValue[2] = 0.04;
^stateFire[2] = true;
^stateAllowImageChange[2] = false;
^stateScript[2] = "onFire";

^stateName[4] = "Reload";
^stateAllowImageChange[4] = false;
^stateTransitionOnTriggerUp[4] = "Ready";
^stateSequence[4] = "Ready";## //LOLSYNTAX

Did you close the sequences with a };

Did you close the sequences with a };
Ahh stuff. Thanks. Locked.