Custom Weapon Sound does not play/all sounds are played Created 6 days ago2024-10-16 19:34:07 UTC by La Hire La Hire

Created 6 days ago2024-10-16 19:34:07 UTC by La Hire La Hire

Posted 6 days ago2024-10-16 19:34:07 UTC Post #349251
I created some simple new weapon sound for the shooting and reloading of the crossbow in Goldsource HL1. I followed the instructions from the tutorials and exported in Audacity as Mono, Wav (Microsoft), 11025 Hz, unassigned 6-Bit or signed 16 Bit.
I moved it to the sound/weapons folder of my mod but when I shoot in game, it automatically loads the reload sound. I tried other settings in Audacity as well and checked a million times the file-names are correct but I dont find the error. When I put the original sound files in the mod-folder it works fine.
Any help please?
Posted 4 days ago2024-10-18 10:49:35 UTC Post #349258
I was not able to fix the root cause but I solved it this way:
Edited the qc-File and entered a direct link to the sounds when they should be triggered:
$sequence fire1 "fire1" fps 60 { event 5004 0 "dartshoot/dartfire.wav" }
$sequence fire2 "fire2" fps 30 { event 5004 0 "dartshoot/dartfire.wav" }
$sequence fire3 "fire1" fps 60 { event 5004 0 "dartshoot/dartfire.wav" }
$sequence reload "reload" fps 30 { event 5004 0 "dartreload/dartreload.wav" }

In the Sound-Folder of the mod I set up two folders with only one wave-file each as in the qc.
Still I had to replace the orignial sound files in the sound/weapons-folder in my mod with 'silent files' (I took the "_comma" from the Barney folder) and the orignial naming. Otherwise it would play my sound and the sounds at the same time.

Still dont understand why this was not working in the first try with the same files.
Posted 4 days ago2024-10-18 20:01:51 UTC Post #349260
Maybe the sounds are being played in code?

https://github.com/ValveSoftware/halflife/blob/master/dlls/crossbow.cpp

Also, do you mean that when shooting the crossbow in your mod, the "reload" sound plays instead? Or that both the "shoot" and the "reload" sounds play? It would help if you shared those sound files with us so we could test it ourselves.

I would suggest you try to investigate further instead of implementing that sloppy fix. Believe me, those hacks are never sustainable in the long term :P
Posted 1 day ago2024-10-21 18:27:36 UTC Post #349270
Oops, looks like we've got ourselves a bot here, gentlemen! I'm gonna submit a status report to the administrator today.
You must be logged in to post a response.