sound.Add -- Multiple sounds for one event (rndwave)?
2 replies, posted
I'm using sound.Add for a few weapons, some of these have multiple sounds for the firing, reloading, etc. Typically on other source games I just add a rndwave to compile sounds for selection when they're played. I tried setting this up in the lua sound.Add function, but it doesn't seem to work. Am I possibly just setting it up wrong or is it not a supported feature of the function?
Here's one event, for example:
[CODE]
sound.Add( {
name = "vdeagle_fire",
channel = CHAN_STATIC,
volume = 1.0,
level = 80,
pitch = { 98, 105 },
rndwave
{
"wave" "weapons/vdeagle/fire1.wav"
"wave" "weapons/vdeagle/fire2.wav"
"wave" "weapons/vdeagle/fire3.wav"
}
} )
[/CODE]
[url]http://wiki.garrysmod.com/page/Structures/SoundData[/url]
"sound: The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory."
so for example
[code]
sound = { "weapons/snd1.wav", "weapons/snd2.wav" }
[/code]
e: wrong section though
Pretty much, your trying to use source's formatting in a lua document.
Sorry, you need to Log In to post a reply to this thread.