Game Development Community

No Sound From Weapon

by J L · in Torque Game Engine · 12/03/2008 (6:52 am) · 8 replies

I changed a sound file from the origional sound file here is my steps I took

1. converted my sound to OGG via DBPoweramp
2. dropped into my sounds folder
3. changed my script to reflect that sound
4. deleted all DSO files
5. fired up game
6. no sound when firing my weapon

tried doing the same thing using audacity

#1
12/03/2008 (7:37 am)
Narrowed it down to this.

I changed the sound file name to the one I replaced and it works, maybe there is another place that the sound file is defined ?
#2
12/06/2008 (2:08 pm)
I still can't find the reason for this. Can anyone help ?
#3
12/06/2008 (2:13 pm)
I can't think of anything directly that may cause this, but a few troubleshooting issues I can think of is:
1) Check the console for errors
2) replace the sound with a known working sound and make sure your code is good. There's a chance that either your code is buggy, or the .ogg is bad.
#4
12/06/2008 (6:41 pm)
I think you're looking for the weapons AudioProfile datablock. If you are using the crossbow datablocks for other weapons then you need to go here to change them.

Open up crossbow.cs in starter.fps\server\scripts

At the top of the file you will see all the audio files that are used and the location. ;)

You can use WAV or OGG audio files. OGG files are created using the Ogg Vorbis encoder.
Go here for the encoder: www.vorbis.com (google.com is your friend!)

What you're looking for....

// Sounds profiles

datablock AudioProfile(CrossbowReloadSound)
{
filename = "~/data/sound/crossbow_reload.ogg";
description = AudioClose3d;
preload = true;
};


If you plan to add a rocket launcher then I would create a new datablock AudioProfile for it like this...

datablock AudioProfile(RocketLauncherReloadSound)
{
filename = "~/data/sound/rocketlauncher_reload.ogg";
description = AudioClose3d;
preload = true;
};

{...}


Make sense?
#5
12/07/2008 (7:42 am)
Make sure your sound file is recorded in mono. Stereo won't work.
#6
12/08/2008 (1:37 pm)
Everything is done, but it still does the same thing. I will keep searching for answers, thanks for all the info
#7
12/08/2008 (2:46 pm)
Here is an old resource but may help you track down your problem.

Weapon Sound Tutorial
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1713

.
#8
12/09/2008 (11:20 am)
Show us your audio description/profile and the relevant section of the weapon script - sometimes a third eye can spot something you miss. Double check that you spelled the name correctly. There might be a problem with DBPoweramp corrupting your .ogg file, I've never used it but I have come across that problem before and my .ogg files would work fine if created in another program.