Blockland Forums > Modification Help
Sound errors now
_Dark_:
I get this error in console and I cannot figure out what's wrong with it.
--- Quote ---//M82 Barrett 50.cal
//Modeler: Aware14 (Beastly loveer)
//Script: Ghille (uber cool one with herbs)
//Herb Productions Inc.
Datablock AudioProfile(##M##82FireSound)
{
filename = "./BarrettFire.wav";
description = AudioClose3d;
preload = true;
};
datablock ParticleData(BarrettTrailParticle)
{
dragCoefficient = 3;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 625;
lifetimeVarianceMS = 55;
textureName = "base/data/particles/cloud"; //Woo cloud of smoke is epic
spinSpeed = 10.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0.3 0.3 0.9 0.4";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.15;
sizes[1] = 0.25;
useInvAlpha = false;
};
datablock ParticleEmitterData(BarrettTrailEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 0.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "BarrettTrailParticle";
};
//### Projectile
AddDamageType("Barrett",'<bitmap:Add-ons/Weapon_Barrett50cal/CI_Barret> %1','%2 <bitmap:Add-ons/Weapon_Barrett50cal/CI_Barret> %1',0.2,1);
//my lack of spelling skill
datablock ProjectileData(BarrettProjectile)
{
uiName = "50.Cal Bullet"; //we should do a custom model here by making the default bullet longer
projectileShapeName = "Add-ons/Weapon_Gun/bullet.dts";
directDamage = 160;
directDamageType = $DamageType::Barrett;
radiusDamageType = $DamageType::Barrett;
brickExplosionRadius = 0;
brickExplosionImpact = true;
brickExplosionForce = 80;
brickExplosionMaxVolume = 1;
brickExplosionMaxVolumeFloati ng = 2;
impactImpulse = 175;
verticalImpulse = 0;
explosion = GunExplosion;
particleEmitter = BarrettTrailEmitter;
muzzleVelocity = 200; // 350
verInheritFactor = 1;
armingDelay = 0;
lifetime = 4000;
fadeDelay = 2000;
bounceElasticity = 0.5;
bounceFriction = 0.2;
isBallistic = true;
gravityMod = 0.10;
hasLight = false;
lightRadius = 3;
lightColor = "1 0.5 0";
};
//### Item
datablock ItemData(BarrettItem)
{
uiName = "M82 Barrett";
iconName = "./UIBarrett";
image = BarrettImage;
category = "Weapon";
className = "Weapon";
shapeFile = "./Barret.dts"; //Awares lack of spelling skill
mass = 4.2;
density = 0.2;
elasticity = 0;
friction = 0.6;
emap = true;
doColorShift = true;
colorShiftColor = "1 1 1 1";
canDrop = true;
};
//### Ze Item Image
datablock ShapeBaseImageData(BarrettImage)
{
shapeFile = "./Barret.dts";
emap = true;
mountPoint = 0;
offset = "0 0 0";
correctMuzzleVector = true;
eyeOffset = "0 0 0";
rotation = eulerToMatrix("0 0 0");
className = "WeaponImage";
item = BarrettItem;
ammo = " ";
projectile = BarrettProjectile;
projectileType = Projectile;
casing = gunShellDebris;
shellExitDir = "1 -1 0.5";
shellExitOffset = "0 0 0";
shellExitVariance = 10;
shellVelocity = 6;
melee = false;
doReaction = false;
armReady = true;
minShotTime = 2000;
doColorShift = true;
colorShiftColor = "1 1 1 1";
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.2;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateName[2] = "Fire";
stateTransitionOnTimeOut[2] = "Reload";
stateTimeoutValue[2] = "0.4";
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateWaitForTimeout[2] = true;
stateEmitter[2] = gunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzlePoint";
stateSound[2] = M82FireSound;
stateScript[2] = "onFire";
stateName[3] = "Reload";
stateTimeoutValue[3] = 0.4;
stateSequence[3] = "Fire";
stateTransitionOnTimeout[3] = "Delay";
stateWaitForTimeout[3] = true;
stateEjectShell[3] = true;
stateAllowImageChange[4] = false;
//ze delay
stateName[4] = "Delay";
stateTimeoutValue[4] = 0.1;
stateTransitionOnTimeout[4] = "Ready";
stateWaitForTimeout[4] = true;
stateAllowImageChange[4] = false;
};
--- End quote ---
Don't think I just posted this on forums without trying. I tried alot of solutions.
Swollow:
um script?
_Dark_:
--- Quote from: swollow on October 18, 2011, 07:50:49 PM ---um script?
--- End quote ---
removed
Amade:
You're attempting to declare a function inside an if statement. Add another } before the function line to close the if statement (it will not cause an error if the gun is disabled).
_Dark_:
I feel embarrassed that i cant figure out these errors.