Game can't load custom weapon sounds, is it the raw filename?
7 replies, posted
The game fails to load my custom weapon sounds.
SWEP.Primary.Sound = Sound("weapons/scout/scout1.wav")
and i also added:
util.PrecacheSound("weapons/scout/scout1.wav")
The game says file is missing. However I know the files are in the correct place. Could it be that the raw filenames never work for weapon sounds? I know from HL2 coding that firing sounds were defined in the game_sounds_weapons script files, however I guess using a modified script does not look very GMOD LUA-y.
If you replaced your sounds, is it possible that there is something wrong with the sound files themselves?
No, I used the same method to create new soundfiles and they work if used in a c++ HL2 Mod.
I mean there has to be a way to use custom firing sounds even if they are not defined in the game_sounds_weapons? If that should fail, I could still somehow glue a sound to the gun that is played whenever it is fired?
Is your sound inside an addon? If so:
Your addon is loaded, correct?
Your sounds are in the sound folder, correct?
If you type play <pathtosound> in the console, does it play?
If all but the third are true, odds are your sound's format is bad ( although you said it works in a sourcemod, so I doubt that ).
It is not in an addon, it is in a gamemode.
[QUOTE=alleycat;18834297]It is not in an addon, it is in a gamemode.[/QUOTE]
Two other questions there.
Definitely is sounding like your content folder isn't working if it's a gamemode.
Put it in your sound folder, then load garry's mod and type play YourSoundPath.wav and see if it plays. I always have troubles with sounds, hate them.
Sorry, you need to Log In to post a reply to this thread.