Conquestus Posted January 20, 2018 Share Posted January 20, 2018 (edited) So I recently made a topic about how to open the inventory of NPC's via dialogues. It can be found here:https://forums.nexusmods.com/index.php?/topic/6324446-dialogue-option-to-open-npc-inventory-scripting/ So the inventory opens with akSpeaker.OpenInventory(true)Now I try to figure out, how to make NPCs wear stuff, if they are given clothes/armor/weapons. At this state, given clothes/armor/weapons simply remain in their inventory unequipped. I know there is this EquipItem() function, yet I don't know how to use it to make the NPC wear stuff from it's own inventory. https://www.creationkit.com/index.php?title=EquipItem_-_Actor I tried to achieve something by adding this additional script into the dialogue (Topic Info), yet I didn't achieve anything with this. Papyrus is so f*ckin hard. ScriptName EEEInventoryScript extends ObjectReference Function EquipItem(Form akItem, bool abPreventRemoval = false, bool abSilent = false) native Event OnItemAdded(Form akItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Self.EquipItem(akItem) endEventAny help? Thanks in advance. EDIT:Found a solution, by adding NPCs as teammates with: akSpeaker.SetPlayerTeammate()Then NPCs will automatically wear given clothes/armor. Edited January 20, 2018 by Conquestus Link to comment Share on other sites More sharing options...
PeterMartyr Posted February 6, 2018 Share Posted February 6, 2018 Or you could've just copied the Mannequin Script from Bethseda, with bool abPreventRemoval = true Link to comment Share on other sites More sharing options...
Deleted65173296User Posted October 26, 2019 Share Posted October 26, 2019 bool abPreventRemoval = true doesnt work. akSpeaker.SetPlayerTeammate() which makes npc doesnt follow player to attack each other because they could not attack teammate both in my test. I have two npc use this code. Then when i attack a npc. B npc will not help me to attack a npc. This bothed me much. Link to comment Share on other sites More sharing options...
Recommended Posts