• Sound() and Pitch problem
    3 replies, posted
When I try to play a sound using Sound() and I try to change the Pitch or Volume of it [code] local Firesound = Sound("Weapon_SMG1.Single") player.GetAll()[1]:GetActiveWeapon():EmitSound(Firesound,100,50) [/code] the sound is still played with the standard 100 pitch or volume. How can I make it still play the sound with lower or higher pitch/volume without having to give the sound path?
I believe Weapon_SMG1.Single is a script with a scripted-in volume and pitch. Try emitting sound by using path to .wav file of it instead of defining sound via Sound() I might be wrong thought.
Sound is just a utility function. [lua]function Sound(snd) util.PrecacheSound(snd) return snd end[/lua] Model() does the same thing. There's no point in precaching something already precached (as all sound scripts are precached). But besides that, you're trying to alter the pitch of a sound script as said above. Which you can't do.
Thanks, but isn't there a way to alter the pitch of a soundscript, without setting it up before? This would come in handy for the Sounds that the Viewmodel plays. Also do you happen to know what sound.AddSoundOverrides( ) does?
Sorry, you need to Log In to post a reply to this thread.