Adding an explosion / collsion sound
by Bryce Kaminsky · in Torque Game Engine · 07/11/2004 (9:02 pm) · 3 replies
I've been adding weapons to my fps game and i cannot understand how to get an explosion sound to work.
i've set up[ the AudioProfile
datablock AudioProfile(MgunExplosionSound)
{
filename = "~/data/sound/mgun/mgun_ricochet.wav";
description = AudioDefault3d;
preload = true;
};
and have set my collsion section
datablock ExplosionData(MgunExplosion)
{
//explosionShape = "~/data/shapes/mgun/explosion.dts";
soundProfile = MgunExplosionSound;
lifeTimeMS = 500;
particleEmitter = MgunExplosionEmitter;
particleDensity = 10;
particleRadius = 0.3;
// Exploding debris
debris = ExplosionDebris;
debrisThetaMin = 0;
debrisThetaMax = 60;
debrisPhiMin = 0;
debrisPhiMax = 360;
debrisNum = 6;
debrisNumVariance = 2;
debrisVelocity = 1;
debrisVelocityVariance = 0.5;
faceViewer = true;
explosionScale = "0.3 0.3 0.3";
};
but it plays the sound from another weapon but not the sound i defined for the object.
any ideas anyone?
i've set up[ the AudioProfile
datablock AudioProfile(MgunExplosionSound)
{
filename = "~/data/sound/mgun/mgun_ricochet.wav";
description = AudioDefault3d;
preload = true;
};
and have set my collsion section
datablock ExplosionData(MgunExplosion)
{
//explosionShape = "~/data/shapes/mgun/explosion.dts";
soundProfile = MgunExplosionSound;
lifeTimeMS = 500;
particleEmitter = MgunExplosionEmitter;
particleDensity = 10;
particleRadius = 0.3;
// Exploding debris
debris = ExplosionDebris;
debrisThetaMin = 0;
debrisThetaMax = 60;
debrisPhiMin = 0;
debrisPhiMax = 360;
debrisNum = 6;
debrisNumVariance = 2;
debrisVelocity = 1;
debrisVelocityVariance = 0.5;
faceViewer = true;
explosionScale = "0.3 0.3 0.3";
};
but it plays the sound from another weapon but not the sound i defined for the object.
any ideas anyone?
About the author
#2
filename = "~/data/sound/mgun/mgun_ricochet.wav";
Are you saying you are not hearing the ricochet? Have you played that wav in your media player to see what it sounds like there?
07/12/2004 (5:59 am)
Just out of curiosity, why are you using a ricochet sound where you want an explosion?filename = "~/data/sound/mgun/mgun_ricochet.wav";
Are you saying you are not hearing the ricochet? Have you played that wav in your media player to see what it sounds like there?
#3
-=Ice Out=-
07/13/2004 (10:55 am)
I've change the sound file from a wav to an Ogg and it worked ? ,,,, i guess oggs work better than .wav 's in torque-=Ice Out=-
Torque 3D Owner Billy L
Do you have the right explosion on projectileData ?