Im working on a LOZ Ocorina of time slingshot. I tried adding a sound for the sling shot pulling back, the slingshot shows up in my add ons list but not my wrench gui. Can someone help me spot my problem in the script.
//Slingshot.cs
datablock AudioProfile(seedHitSound)
{
filename = "./seedHit.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SlingshotFireSound)
{
filename = "./SlingshotFire.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(SlingshotPullSound)
{
filename = "./SlingshotPull.wav";
description = AudioClosest3d;
preload = true;
};
datablock ParticleData(seedTrailParticle)
{
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] = "1 1 1 0.2";
colors[1] = "1 1 1 0.0";
sizes[0] = 0.2;
sizes[1] = 0.01;
times[0] = 0.0;
times[1] = 1.0;
};
datablock ParticleEmitterData(seedTrailEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 0; //0.25;
velocityVariance = 0; //0.10;
ejectionOffset = 0;
thetaMin = 0.0;
thetaMax = 90.0;
particles = seedTrailParticle;
useEmitterColors = true;
uiName = "Seed Trail";
};
//effects
datablock ParticleData(seedExplosionParticle)
{
dragCoefficient = 5;
gravityCoefficient = 0.1;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 300;
textureName = "base/data/particles/chunk";
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0] = "0.9 0.9 0.6 0.9";
colors[1] = "0.9 0.5 0.6 0.0";
sizes[0] = 0.25;
sizes[1] = 0.0;
};
datablock ParticleEmitterData(seedExplosionEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 5;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 80;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "seedExplosionParticle";
useEmitterColors = true;
uiName = "Seed Explosion";
};
datablock ExplosionData(seedExplosion)
{
//explosionShape = "";
soundProfile = seedHitSound;
lifeTimeMS = 150;
particleEmitter = SeedExplosionEmitter;
particleDensity = 10;
particleRadius = 0.2;
emitter[0] = "";
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 = 1;
lightStartColor = "0.3 0.6 0.7";
lightEndColor = "0 0 0";
};
datablock ParticleData(seedExplosionParticle)
{
dragCoefficient = 8;
gravityCoefficient = -0.3;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 300;
textureName = "base/data/particles/cloud";
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0] = "0.5 0.5 0.5 0.9";
colors[1] = "0.5 0.5 0.5 0.0";
sizes[0] = 0.45;
sizes[1] = 0.0;
useInvAlpha = true;
};
datablock ParticleEmitterData(seedExplosionEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 3;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "seedExplosionParticle";
useEmitterColors = true;
uiName = "Seed Vanish";
};
datablock ExplosionData(seedExplosion)
{
//explosionShape = "";
soundProfile = "";
lifeTimeMS = 50;
emitter[0] = seedExplosionEmitter;
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 = 1;
lightStartColor = "0.3 0.6 0.7";
lightEndColor = "0 0 0";
};
AddDamageType("seedDirect", '<bitmap:add-ons/Weapon_Slingshot/CI_seed> %1', '%2 <bitmap:add-ons/Weapon_Slingshot/CI_seed> %1',0.5,1);
datablock ProjectileData(seedProjectile)
{
projectileShapeName = "./seed.dts";
directDamage = 30;
directDamageType = $DamageType::seedDirect;
radiusDamageType = $DamageType::seedDirect;
radiusDamage = 0;
damageRadius = 0;
explosion = seedExplosion;
stickExplosion = seedStickExplosion;
bloodExplosion = seedStickExplosion;
particleEmitter = seedTrailEmitter;
explodeOnPlayerImpact = true;
explodeOnDeath = true;
armingDelay = 0;
lifetime = 4000;
fadeDelay = 4000;
bounceFriction = 0.0;
bounceElasticity = 0.0;
isBallistic = false
gravitymod = 2.0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
muzzleVelocity = 65;
velInheritFactor = 1;
uiName = "Seed";
};
//////////
// item //
//////////
datablock ItemData(SlingshotItem)
{
category = "Weapon";
className = "Weapon";
// Basic Item Properties
shapeFile = "./Slingshot.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
//gui stuff
uiName = "Slingshot";
iconName = "./icon_Slingshot";
doColorShift = false;
colorShiftColor = "0.0 0.0 0.0 0.0";
// Dynamic properties defined by the scripts
image = SlingshotImage;
canDrop = true;
};
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(SlingshotImage)
{
// Basic Item properties
shapeFile = "./Slingshot.dts";
emap = true;
mountPoint = 0;
offset = "0 0 0";
eyeOffset = 0; //"0.7 1.2 -0.5";
rotation = eulerToMatrix( "0 0 10" );
correctMuzzleVector = true;
className = "WeaponImage";
// Projectile && Ammo.
item = BowItem;
ammo = " ";
projectile = seedProjectile;
projectileType = Projectile;
melee = false;
//raise your arm up or not
armReady = true;
doColorShift = false;
colorShiftColor = BowItem.colorShiftColor;//"0.400 0.196 0 1.000";
//casing = " ";
// Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.0;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateTimeoutValue[1] = 0.2;
stateSequence[1] = "Ready";
stateSound[1] = SlingshotPullSound
stateName[2] = "Fire";
stateTransitionOnTimeout[2] = "Reload";
stateTimeoutValue[2] = 0.3;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateSound[2] = SlingshotFireSound;
stateName[3] = "Reload";
stateSequence[3] = "Reload";
stateAllowImageChange[3] = false;
stateTimeoutValue[3] = 0.5;
stateWaitForTimeout[3] = true;
stateTransitionOnTimeout[3] = "Check";
stateName[4] = "Check";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";
stateName[5] = "StopFire";
stateTransitionOnTimeout[5] = "Ready";
stateTimeoutValue[5] = 0.2;
stateAllowImageChange[5] = false;
stateWaitForTimeout[5] = true;
//stateSequence[5] = "Reload";
stateScript[5] = "onStopFire";
};
Any help will be greatly appreciated.