• Custom Weapon Sounds Not Playing?
    11 replies, posted
Hey guys, I am new to the forum here at FacePunch, and I am also sort of new to LUA scripting, as I have only been doing weapon scripting for a few days now. My weapon model, materials, shared.lua etc. all work as they should, except for some sounds. The firing sound works, but the rest of the sounds that should go with the model don't work. I am using Mad Cow's M3 lua (I hope you don't mind, I gave you credit in the main base lua.) as a base for my shotgun, and the model and sounds came in a pack at FPSBanana. Should I post the lua and model or something for you guys to help me out? *Edit* Sounds do work for reloading etc, but the sounds that I WANT to work don't, it only plays the CSS defaults for the shotgun. *Edit* It has done this with every single weapon I have made so far, and it annoys me very much. I have the sounds in the proper folders in my addon folder where they should be, it just doesn't work for some reason.
It's because Source assigns sounds to the models.
[QUOTE=Chad Mobile;20194734]It's because Source assigns sounds to the models.[/QUOTE] So, is there any way to fix this? Most all weapon packs nowadays have custom sounds for the models. Pardon me if my questions sound extremely nooby.
You need to use a new model or hex it or something. I've never run into this problem except for a revolver weapon I was making, it used the model from Zombie Panic: Source and the reload sound would play the HL2 revolvers reload no matter what I did.
[QUOTE=Chad Mobile;20195336]You need to use a new model or hex it or something. I've never run into this problem except for a revolver weapon I was making, it used the model from Zombie Panic: Source and the reload sound would play the HL2 revolvers reload no matter what I did.[/QUOTE] Ok, I will try that later. I deleted all of my addons except for the one I was making, to free up some loading time, because it took FOREVER to load the game, including loading a singleplayer map, which is a real pain in the ass for swep making. My internet crashed a little bit after that, and now I am performing my regular scan of viruses and spyware. Thank you for the help.
No problem, I'm just hoping that IS the problem and I'm not completely wrong.
[QUOTE=Chad Mobile;20195336]You need to use a new model or hex it or something. I've never run into this problem except for a revolver weapon I was making, it used the model from Zombie Panic: Source and the reload sound would play the HL2 revolvers reload no matter what I did.[/QUOTE] I'm having this problem too. Do you mean that I should rehex the model, or just do a new one altogether?
Pretty sure you'd just need a new one. OR: Are you using a SWEP? Because I just remembered I made a swep using the CS:S Mp5 model and it used a custom shoot sound fine. Whats the EXACT problem?
I have a few models in a pack I'm making for someone. One model I'm using, for instance, a Glock 18c, doesn't play the reload sounds and the sliding sounds.
What is your reload sound script?
[QUOTE=Chad Mobile;20207082]What is your reload sound script?[/QUOTE] Say what? I noticed in a new deagle skin that I downloaded, it came with a script for the sounds that went along with it. However, I am unsure as of how and where to put into my addon folder. I know that this just may fix the problem. So, where and how do I put it into my addon folder? [editline]11:21AM[/editline] [QUOTE=Chad Mobile;20207082]What is your reload sound script?[/QUOTE] Well, here is my sound script for my deagle weapon, which the sounds also don't work for some reason. The script is in garrysmod/scripts/sounds , and I named it geagle.txt. "Weapon_Geagle.Single" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/Deagle-1.wav" } "Weapon_Geagle.Magout" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/Magout.wav" } "Weapon_Geagle.Magin" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/Magin.wav" } "Weapon_Geagle.SlideRelease" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/SlideRelease.wav" } "Weapon_Geagle.Slideback" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/slideback.wav" } "Weapon_Geagle.SlideForward" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" "wave" "weapons/geagle/slideforward.wav" } *Edit* Well, the firing sound works becuase I added it into the script, and I also tried to use the precache sound function in the swep lua, but the sounds for reloading etc. still do not work. I am getting very frustrated with GarrysMod.
I have the exact same problem. I think it has something to do with the name of the .txt file name. say you have a lua weapon called weapon_usp_555 I think the sound script has to be called weapon_usp_555.txt This file should be found under username/garrysmod/garrysmod/scripts/.... I also think that the names of the sounds in the script corispond to the sounds garrysmod will actually look for. For Example in your script, ================================ "wave" "weapons/geagle/Deagle-1.wav" } "Weapon_Geagle.Magout" { "channel" "CHAN_ITEM" "volume" "1.0" "CompatibilityAttenuation" "1.0" "pitch" "PITCH_NORM" ====================== The top line of this is "weapons/geagle/Deagle-1.wav". Make sure that the file names and folders are EXACTLY as seen in the script. from my own experience sounds that are named similar to the CSS sounds are usually overiden by the default css sounds. e.g "Deagle-1.wav" try renaming it to "geagle-1.wav" in both the sound script and folder. Those are my suggestions & I hope they help :D Good Luck on your project !!!
Sorry, you need to Log In to post a reply to this thread.