Sounds not emitting

I finally managed to finish my reload animation, so now I wanted to start on adding the sounds.

I think I’m doing it wrong at the moment. What I did was use HLMV to get to the right frame, select a random sound, copy the QC String and then replace the sound name with my sound name. Also tried the sound path but didn’t work aswell.

Is this correct or horribly wrong?

QC:



$cd "E:\Users\Jasper\Modeling\v_models\laserrifle\"
$modelname "weapons/v_laserrifle.mdl"
$model "studio" "v_laserrifle_reference.smd"

$cdmaterials "models\Weapons\V_hand\"
$cdmaterials "models\weapons\laserrifle\"

$hboxset "default"
$hbox 0 "ValveBiped.Bip01_Weapon_Bone"	    -2.50  -21.00   -1.00     2.50    5.00    9.00

// Model uses material "v_hand_sheet.vmt"
// Model uses material "laserrifle01.vmt"
// Model uses material "laserrifle02.vmt"
// Model uses material "microfusioncell01.vmt"

$attachment "muzzle" "ValveBiped.Bip01_Weapon_Bone" -0.50 -19.00 7.00 rotate -0 -90 0

$surfaceprop "default"

$illumposition 20.728 -6.084 -7.257

$sequence idle "idle" loop ACT_VM_IDLE 1 fps 30.00 node Ready
$sequence fire "fire" ACT_VM_PRIMARYATTACK 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}
$sequence reload "reload" ACT_VM_RELOAD 1 fps 25.00 node Ready {
	{ event AE_CL_PLAYSOUND 17 "wpn_riflelaser_reloadinout" }
}


Did you try “Weapon_AR2.Reload_Rotate” instead of “wpn_riflelaser_reloadinout”?

[editline]01:53PM[/editline]

or “Weapon_AR2.Reload_Push”

Ah yeah, I forgot to convert to the proper format, thanks I’ll do that now.

Odd, I converted it to a 22500 Mono sound, but it still won’t emit.

If you made your own sound, you’re gonna need to have gmod load it in scripts/game_sounds_manifests.txt and the other files it loads, and you have to refer to it by the name you give it, not that name of the sound file.

Didn’t work aswell. I created a new folder, created a new textfile, named it weapons.txt. Then I added these lines in it:



//Laserrifle
"Weapon_Laserrifle.Clipout"
{
	"channel"		"CHAN_ITEM"
	"volume"		"1.0"
	"CompatibilityAttenuation"	"1.0"
	"pitch"		"PITCH_NORM"

	"wave"			"weapons\Laserrifle\weapon_laserrifle_reloadout.wav"
}

"Weapon_Laserrifle.Clipin"
{
	"channel"		"CHAN_ITEM"
	"volume"		"1.0"
	"CompatibilityAttenuation"	"1.0"
	"pitch"		"PITCH_NORM"

	"wave"			"weapons\laserrifle\weapon_laserrifle_reloadin.wav"
}

"Weapon_Laserrifle.Single"
{
	"channel"		"CHAN_WEAPON"
	"volume"		"1.0"
	"CompatibilityAttenuation"	"ATTN_NORM"
	"pitch"		"PITCH_NORM"

	"wave"			"weapons\laserrifle\wpn_riflelaser_fire_v1.wav"
}

And this the the game_sounds_manifest.txt file:


	"precache_file"		"scripts/noxfallout/weapons.txt"

I also tried adding it to a existing weapons.txt file, but that didn’t work either.