leron9999 Posted June 29, 2015 Share Posted June 29, 2015 Hello! I'm trying to make use of GetEnchantment(Actor akActor, int handSlot, int slotMask), SetEnchantment(Actor akActor, int handSlot, int slotMask, Enchantment source, float maxCharge), and CreateEnchantment(Actor akActor, int handSlot, int slotMask, float maxCharge, MagicEffect[] effects, float[] magnitudes, int[] areas, int[] durations), but I can't make it so that it only accepts a handSlot. I've tried this:myEnchantment = WornObject.GetEnchantment(wiseman, 1, none) I'm essentially trying to get the enchantment of my right-hand weapon, but the method requires SlotMask to be not none, otherwise I get an error. What is the right way to use this method from the WornObject script? Link to comment Share on other sites More sharing options...
sevencardz Posted June 29, 2015 Share Posted June 29, 2015 Try this:myEnchantment = WornObject.GetEnchantment(wiseman, 1, 0)There's some documentation in the WornObject.psc source: "Use zero when using hand slot"A word of caution - using SetEnchantment() to set an enchantment to None (remove it) seems to cause a CTD if there's no enchantment there to remove. Link to comment Share on other sites More sharing options...
leron9999 Posted June 30, 2015 Author Share Posted June 30, 2015 I'll give it a whirl. Thanks! Link to comment Share on other sites More sharing options...
leron9999 Posted June 30, 2015 Author Share Posted June 30, 2015 UPDATE:I got it to work by setting the slot mask to 0. My question now is, how do I set the weapon to be none so that I'm solely targeting the slot mask for the method? Link to comment Share on other sites More sharing options...
sevencardz Posted June 30, 2015 Share Posted June 30, 2015 Same idea, reversed:Actor actorRef = Game.GetPlayer()int slotMask = Armor.GetMaskForSlot(30) ; head; get the enchantment on the item at this slotEnchantment ench = GetEnchantment(actorRef, 0, slotMask); remove the enchantment on the item at this slotif ench != None SetEnchantment(actorRef, 0, slotMask, None, 0)endIfBasically, it ignores the hand slot parameter if you specify a non-zero slot mask. Link to comment Share on other sites More sharing options...
leron9999 Posted July 1, 2015 Author Share Posted July 1, 2015 Ah, I see. Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts