Hi all,
As my scripting skills are very very low, I'm asking help here to reach my goals.
I'm trying to enhance http://skyrim.nexusmods.com/mods/1117//? by modifying the sound's level of the draw/sheath action.
The idea is too reduce half the level (and maybe more) of the sound made by your weapon when you draw, or sheath, your weapon while sneaking.
I first wanted to make two different sounds for these (if sneaking or not) but I think it appears more easier and efficient to simply adjust the sound's volume.
And to do so, as it was advised to me, I created a new sound category to be manipulated. (Of course, I also redirected the sound descriptor to that category)
As I was expecting, my following code doesn't work ! And give no notifications. But at least compile correctly.
I didn't even know where it's supposed to be called, so I tried to add it on a weapon for tests...
{Draw and sheath sounds reduced while sneaking}
Actor Property PlayerREF Auto
SoundCategory Property AudioCategorySneaked Auto
Event OnEquipped(Actor akActor)
If ((akActor == PlayerREF) && ((PlayerREF.GetEquippedItemType(0) == 0||1||2||3||4||5||6||7||8||10||12) || (PlayerREF.GetEquippedItemType(1) == 0||1||2||3||4||5||6||7||8||10||12) ) )
If (akActor.IsSneaking())
AudioCategorySneaked.SetVolume(0.2)
Debug.notification("Equip while sneaking")
Else
AudioCategorySneaked.SetVolume(1.0)
Endif
Endif
EndEvent
Event OnUnequipped(Actor akActor)
If ((akActor == PlayerREF) && ((PlayerREF.GetEquippedItemType(0) == 0||1||2||3||4||5||6||7||8||10||12) || (PlayerREF.GetEquippedItemType(1) == 0||1||2||3||4||5||6||7||8||10||12) ) )
If (akActor.IsSneaking())
AudioCategorySneaked.SetVolume(0.2)
Debug.notification("Equip while sneaking")
Else
AudioCategorySneaked.SetVolume(1.0)
Endif
Endif
EndEvent
So if anyone has a clue, a lead or a better idea to help me make this working, I will really appreciate

Thank you in advance for your time.
Best,