Custom weapon model uses default draw + reload sounds

Got problems with your models? Struggling with textures? Get help with your custom assets.

Custom weapon model uses default draw + reload sounds

Postby nub on Tue Apr 03, 2012 11:01 pm

I made a glock reskin for the Half-Life 2 pistol but I'm having some trouble and I can't figure out why.

Basically, the darn thing isn't using the custom sounds I created for it. The draw has a slide pull animation which is supposed to use custom sound events from the QC, but in-game, these are ignored so the draw animation is totally silent. The reload animation also has custom sound events, but it just uses the default reload sound, when it should use a total of four different sounds. Here's my QC:

Code: Select all
$modelname "weapons\v_pistol.mdl"
$model "studio" "Ref_hl2default.smd"
$cdmaterials "models\Weapons\V_hand\"
$cdmaterials "models\weapons\me_G18C\"
$hboxset "default"
// Model uses material "glock18.vmt"
// Model uses material "v_hand_sheet.vmt"
$attachment "muzzle" "Base" 0.0 -6.60 1.80 rotate -0.00 -90.00 0.00
$attachment "1" "Base" -0.50 0.00 2.00 rotate -20.00 180.00 0.00
$surfaceprop "default"
$illumposition 12.972 0.702 -35.781
$sequence idle01 "idle01" loop ACT_VM_IDLE 1 snap rotate -90 fps 30.00 node 0
$sequence idle01empty "idle01empty" loop ACT_VM_IDLE_EMPTY 1 snap rotate -90 fps 30.00 node 0
$sequence fire "fire" ACT_VM_PRIMARYATTACK 1 snap rotate -90 fps 50.00 {
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_CL_CREATE_PARTICLE_EFFECT 5 "smoke_trail follow_attachment muzzle" }
  { event 6001 3 "0" }
}

$sequence fire1 "fire1" ACT_VM_RECOIL1 1 snap rotate -90 fps 50.00 {
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_CL_CREATE_PARTICLE_EFFECT 5 "smoke_trail follow_attachment muzzle" }
  { event 6001 3 "0" }
}

$sequence fire2 "fire2" ACT_VM_RECOIL2 1 snap rotate -90 fps 45.00 {
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_CL_CREATE_PARTICLE_EFFECT 5 "smoke_trail follow_attachment muzzle" }
  { event 6001 3 "0" }
}

$sequence fire3 "fire3" ACT_VM_RECOIL3 1 snap rotate -90 fps 45.00 {
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" }
  { event AE_CL_CREATE_PARTICLE_EFFECT 5 "smoke_trail follow_attachment muzzle" }
  { event 6001 3 "0" }
}

$sequence fireempty "fireempty" ACT_VM_DRYFIRE 1 snap rotate -90 fps 30.00
$sequence draw "draw" ACT_VM_DRAW 1 snap rotate -90 fps 30.00 node 0 {
  { event 5004 4 "Weapon_Pistol.Slideback" }
  { event 5004 11 "Weapon_Pistol.Sliderelease" }
}

$sequence drawempty "drawempty" snap rotate -90 fps 30.00 node 0
$sequence reload "reload" ACT_VM_RELOAD 1 snap rotate -90 fps 40.00 node 0 {
  { event 5004 17 "Weapon_Pistol.Clipout" }
  { event 5004 38 "Weapon_Pistol.Clipin1" }
  { event 5004 44 "Weapon_Pistol.Clipin2" }
  { event 5004 56 "Weapon_Pistol.Sliderelease" }
}

$sequence holster "holster" ACT_VM_HOLSTER 1 snap rotate -90 fps 30.00 node 0
$sequence holsterempty "holsterempty" ACT_VM_HOLSTER 1 snap rotate -90 fps 30.00 node 0
$sequence idletolow "idletolow" ACT_VM_LOWERED_TO_IDLE 1 snap rotate -90 fps 30.00 transition 0 1
$sequence lowtoidle "lowtoidle" ACT_VM_IDLE_TO_LOWERED 1 snap rotate -90 fps 30.00 transition 1 0
$sequence lowidle "lowidle" loop ACT_VM_IDLE_LOWERED 1 snap rotate -90 fps 30.00 node 1


This skin works flawlessly in Episode 2. It's HL2 I'm having problems with. I did install Filip Viktor's mod which updates the entire game for Orange Box, so I'm wondering if maybe that's causing issues for this skin. The thing is, I made sure to update the game_sounds_weapons.txt file which had all the sound events from the QC in it; pointing to the correct sound files. I've quadruple-checked it too.


EDIT: I forgot to post the pistol sound script from game_sounds_weapons.txt.

Code: Select all
// weapon_pistol.txt
"Weapon_Pistol.Reload"
{
   "channel"      "CHAN_ITEM"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_NORM"

   "wave"      "weapons/pistol/pistol_reload1.wav"
}

"Weapon_Pistol.NPC_Reload"
{
   "channel"      "CHAN_ITEM"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_NORM"

   "wave"      "weapons/smg1/smg1_reload.wav"
}

"Weapon_Pistol.Empty"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_NORM"

   "wave"      "weapons/pistol/pistol_empty.wav"
}

"Weapon_Pistol.Single"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "1.0"
   "soundlevel"      "SNDLVL_GUNFIRE"
   "pitch"         "98,100"

   "wave"      ")weapons/pistol/pistol_fire.wav"
   "wave"      ")weapons/pistol/pistol_fire1.wav"
   "wave"      ")weapons/pistol/pistol_fire2.wav"
}

"Weapon_Pistol.NPC_Single"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_GUNFIRE"
   "pitch"         "90,120"

   "wave"      "^weapons/pistol/pistol_fire3.wav"
}

"Weapon_Pistol.Special1"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_NORM"

   "wave"      "weapons/smg1/switch_single.wav"
}

"Weapon_Pistol.Special2"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_NORM"

   "wave"      "weapons/smg1/switch_burst.wav"
}

"Weapon_Pistol.Burst"
{
   "channel"      "CHAN_WEAPON"
   "volume"      "0.7"
   "soundlevel"      "SNDLVL_GUNFIRE"
   "pitch"         "98,105"

   "wave"      "^weapons/smg1/smg1_fireburst1.wav"
}

"Weapon_Pistol.Clipout"
{
   "channel"         "CHAN_ITEM"
   "volume"         "1.0"
   "soundlevel"         "SNDLVL_NORM"
   "pitch"            "95,105"

   "wave"         "weapons/Pistol/out.wav"
   
}

"Weapon_Pistol.Clipin1"
{
   "channel"         "CHAN_ITEM"
   "volume"         "1.0"
   "soundlevel"         "SNDLVL_NORM"
   "pitch"            "95,105"

   "wave"         "weapons/Pistol/in1.wav"
   
}

"Weapon_Pistol.Clipin2"
{
   "channel"         "CHAN_ITEM"
   "volume"         "1.0"
   "soundlevel"         "SNDLVL_NORM"
   "pitch"            "95,105"

   "wave"         "weapons/Pistol/in2.wav"
   
}

"Weapon_Pistol.Sliderelease"
{
   "channel"         "CHAN_ITEM"
   "volume"         "1.0"
   "soundlevel"         "SNDLVL_NORM"
   "pitch"            "95,105"

   "wave"         "weapons/Pistol/release.wav"
   
}

"Weapon_Pistol.Slideback"
{
   "channel"         "CHAN_ITEM"
   "volume"         "1.0"
   "soundlevel"         "SNDLVL_NORM"
   "pitch"            "95,105"

   "wave"         "weapons/Pistol/back.wav"
   
}
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Custom weapon model uses default draw + reload sounds

Postby cra0kalo on Thu Apr 12, 2012 3:14 am

hmm I can't see a problem :( though I'm interested on how the AE_CL_CREATE_PARTICLE_EFFECT works
since once the particle is created it can not be destoryed.
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Custom weapon model uses default draw + reload sounds

Postby Jangalomph on Thu Apr 12, 2012 7:38 pm

The particle probably has a set life time, once that life time is up, it'll never spawn again, unless commanded to. Hence "pulling the trigger".

Edit:

Also in hl2 code, it may reference the pistol sounds in a totally different way in code. Though I wouldn't know. Do you get any console errors?
http://www.nomoreroominhell.com
I don’t know whether I was right or wrong, I guess I’ll never know… But I made it. And I guess I should be thankful for that. - Strelok
Has anyone really been far even as decided to use even go want to do look more like?
User avatar
Jangalomph
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Wed Jun 25, 2008 3:19 pm
Location: Sumter, SC

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users