zaira Posted January 18, 2016 Posted January 18, 2016 If I use clothes with custom enchantments EquipItem() won't apply the enchantment to the NPC. function EquipOutfit(Armor[] clothes,Actor npc,Enchantment ench) int x = clothes.Length while x > 0 x -= 1 if Math.LogicalAnd(clothes[x].GetSlotMask(),0x04) clothes[x].SetEnchantment(ench) endif npc.EquipItem(clothes[x]) endwhile endfunction Any idea what's wrong? If I replace EquipItem with EquipItemEx the NPC ends naked.
Guest Posted January 18, 2016 Posted January 18, 2016 Before equipping check if the npc has the armor, if not, then add it to the inventory.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.