Game Development Community

Ringing" noise for loud noises, flashbangs, gunshots, etc.

by Logan Strunk · in Torque Game Engine · 01/01/2007 (10:46 pm) · 1 replies

I want the ability to playing a ringing noise when my players have gotten too close to an explosion, or just shot a loud gun, or etc.

Heres what I have so far.

I need to make a client side script, that takes some variables from my gun and explosion scripts.



Then, make an equation that computes how loud the ringing noise should be and the length of time it should last for.

Decrease the volume on all the other sound channels, playing the ringing noise on a set channel cranked all the way up, then slowling turn back up the volume on my other channels.

alxSetChannelVolume( channelD , volume )

I know that will decrease the volume on a channel.

Couple of questions. How many channels does torque have so I know how many channels I need to turn down then back up?

And, how do I play a sound on a set channel? I know I'd want to do a for loop, and turn down everything but my ringing noise channel, but how do I make sure that sound gets played on the proper channel?


Thanks

#1
01/02/2007 (3:11 am)
You setup the amount of channels in common/client/audio.cs default is 8.
Every single channel you setup with the globals in your audioprofiles.cs
like $SimAudioType = 2 ; then you specifie in audiodescriptions what channel to use.
and after that in the audiodatablock what description to use.

So if you do a new ex. $specfxAudioType on channel 8 or something.
make a audiodescription for all the specfx sounds and point all specfxdatablocks to use
that description, then it will work.