I have found that if a player makes their "normal" weapon into an enchanted weapon then GetEnchantment() will not work.
Is this correct? If so is there another way to detect if a weapon object ref is an enchanted weapon or not?
I have found that if a player makes their "normal" weapon into an enchanted weapon then GetEnchantment() will not work.
Is this correct? If so is there another way to detect if a weapon object ref is an enchanted weapon or not?
Is AttackerWeapon a Weapon variable or an ObjectReference variable? I think the Weapon.GetEnchantment function only returns an enchantment when the base form has an enchantment. ObjectReference.GetEnchantment has a comment above it that says "Returns the player-made enchantment if there is one". WornObject.GetEnchantment has the same comment above it and is probably what you'll want to use if the weapon you are checking is equipped by an actor.
right sorry
oh for pete's sake this was easier than I was thinking you meant...
if (WornObject.GetEnchantment(playerref, 1, 0)) ; 1 is right hand the next zero is slot for weapons
Thanks again MrJack.
Edit: do you know if I must do BOTH:
AttackerWeapon.GetEnchantment() ; AttackerWeapon is a weapon var