View Single Post
PRince4
New Member
Join Date: Sep 2017
Old 07-02-2021 , 07:36   Re: Custom weapon firing sound
Reply With Quote #3

Quote:
Originally Posted by evans View Post
.
You are/were in the wrong place of the forums, or maybe even at the wrong forum. I don't know if these type of questions are supported here since this forum was mostly made for Scripting and plugins.

But anyway here's how to add custom (Firing) Sounds to weapons :

Add this under any $sequence :
Code:
{ event 5004 0 "Weapon_%NAME%.Shoot" }
"event 5004" is the one that registers sounds, 0 is the frame number and "Weapon_%Name%.Shoot is the entry that will locate the sound for you.

Now you will also need to define "Weapon_%Name%.Shoot" in a Sound manifest.
Open "game_sounds_manifests.txt" in script folder and add this to the very end but before the ending bracket : "scripts/weapons/%NAME%.txt"

Now create the txt in "scripts\weapons\%NAME%.txt"

open the txt and put the following :

Code:
"Weapon_%NAME%.Shoot"
{
	"Channel"		"CHAN_ITEM"
	"Volume"		"1.0"
	"CompatibilityAttenuation"	"1.0"
	"Pitch"			"PITCH_NORM"

	"Wave"			"Weapons\%NAME%\Shoot.wav"
}
And now compile your weapon, don't forget to change the "%NAME%" to something like "MP5". That's it.
PRince4 is offline