Zorgman Posted August 29, 2017 Share Posted August 29, 2017 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 IIYAMA Posted August 29, 2017 Moderators Share Posted August 29, 2017 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
Zorgman Posted August 29, 2017 Author Share Posted August 29, 2017 (edited) 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 August 29, 2017 by Zorgman Link to comment
Moderators IIYAMA Posted August 29, 2017 Moderators Share Posted August 29, 2017 Maybe you can base it on the current gear: https://wiki.multitheftauto.com/wiki/GetVehicleCurrentGear To be honest it will be a lot of work, I personally do not recommend it unless it is a very important detail. 2 Link to comment
Zorgman Posted August 29, 2017 Author Share Posted August 29, 2017 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now