ScarT wrote:I usually do it in the QC file because it's easy to recompile. Here's how it's done with the v_357.mdl from Half-Life 2.
- Code: Select all
$sequence reload "Reload" fps 30 activity ACT_VM_RELOAD 1 node Ready {
{ event AE_CL_PLAYSOUND 28 "Weapon_357.OpenLoader" }
{ event AE_CL_PLAYSOUND 39 "Weapon_357.RemoveLoader" }
{ event 3015 55 }
{ event AE_CL_PLAYSOUND 67 "Weapon_357.ReplaceLoader" }
{ event AE_CL_PLAYSOUND 92 "Weapon_357.Spin" }
}
You can find the list of valid animation events, and what they're used for
here.
Thanks ScarT (Long time no chat by the way!)
So I've read the article, and now have this in my QC file.
- Code: Select all
$sequence reload "reload" activity ACT_VM_RELOAD 1 fps 30.00 node 0
{
{ event AE_CL_PLAYSOUND 0 "Weapon_pistol.Reload" }
}
(I've assumed the 0 between PLAYSOUND and "Weapon_pistoletc" is basically a timecode, 0 being plays instantly, and 1 being 1 millisecond or second or something?
But I'm still not getting any reload sound on reloading. I have made anim smd name "Reload", as well as popping a sound in weapons\pistol\pistol_reload.wav to make things simple. I've checked to make sure the sound can be played in the engine (if I rename pistol_reload.wav pistol_fire2.wav, it works fine) What am I doing incorrectly?