I'm trying to damage the health of the NPCs' armor and weapon on death.
I've been able to script their armor damage so that it it works perfectly in my script, but I cannot seem to get the equipped weapon's health to be damage. I think that the problem may be mostly because the weapon is often dropped, but even when the weapon is not dropped, it is still not damaged. I've even tried using the right hand slot, without any success. This is the part of my script that I'm having problems with (the armor part works great).
set rTarget to GetCrosshairRefif rTarget.getDead set ArmorHealth to rTarget.GetEquippedCurrentHealth 2 if ArmorHealth > 25 set ArmorHealth to 25 rTarget.SetEquippedCurrentHealth ArmorHealth 2 endif set WeaponHealth to rTarget.GetEquippedCurrentHealth 5 if WeaponHealth > 25 set WeaponHealth to 25 rTarget.SetEquippedCurrentHealth WeaponHealth 5 endifendif
Any suggestions would be greatly appreciated.
Edited: I forgot to add that this is part of a quest script.