Jump to content

Chainsaw sound


Zorgman

Recommended Posts

Hi guys,

I need to disable the chainsaw sound on my server (long story short, I use it as an invisible weapon for a zombie special attack and I cannot have them buzz around :) ). I did just so using setWorldSoundEnabled, but to my surprise the vehicle engine sounds are composite and use the chainsaw sound file themselves. So I also (partially) lost the engine sound for Sanchez, Picador, Seasparrow and probably many more vehicles that I did not test yet.

Is there any way to disable the sound selectively so it does not affect the vehicles?

Thanks!

Link to comment
  • Moderators

Did you disable the entire group or just a sound of the group?

bool setWorldSoundEnabled( int group, [ int index = -1, ] bool enable )

If the exact same sound is disabled(not a group of sounds) then you can not. (except if you create an overwrite of all the vehicles)

 

Link to comment

I disabled three individual sounds from one group, to be precise.

setWorldSoundEnabled(40,1,false)
setWorldSoundEnabled(40,0,false)
setWorldSoundEnabled(40,2,false)

In the vehicles case, these sounds are used after the initial acceleration stage. I cannot see a way to properly add them back (with getElementVelocity on a loop maybe, but sounds messy and the trigger point would probably have to be different for each vehicle), unless I just make a 3D sound play for as long as the engine is on.

Thanks for your reply!

Edited by Zorgman
Link to comment

The zombie attack detail is more important, and I wouldn't invest too much time in the vehicle sounds, I ain't running a racing gamemode afterall :) I'll just attach the 3D sound and I'll tie the volume to the vehicle gear using the function you showed above, for a bit of variation.

Thanks a lot!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...