Akor Posted January 23, 2021 Posted January 23, 2021 Hi, I have this problem that NPCs unequip items that have been equipped via script (EquipItem) It always happens when the NPC is changing the cell (gets teleported)... Anyone knows to to fix|prevent this?
MTB Posted January 23, 2021 Posted January 23, 2021 2 hours ago, Akor said: Hi, I have this problem that NPCs unequip items that have been equipped via script (EquipItem) It always happens when the NPC is changing the cell (gets teleported)... Anyone knows to to fix|prevent this? The following applies to Skyrim, but Fallout scripting seems very similar, so may be relevant : NPCs regularly check what to wear; eg when 3d is loaded they may equip their default outfit. You could try setting the abPreventRemoval = true when calling equipitem to so if that solves it. If not you could try to put the items in an outfit and assign that to the NPC (https://www.creationkit.com/fallout4/index.php?title=SetOutfit_-_Actor) or you could reequip them in an OnLoad method (https://www.creationkit.com/fallout4/index.php?title=OnLoad_-_ObjectReference).
Akor Posted January 23, 2021 Author Posted January 23, 2021 9 hours ago, MTB said: The following applies to Skyrim, but Fallout scripting seems very similar, so may be relevant : NPCs regularly check what to wear; eg when 3d is loaded they may equip their default outfit. You could try setting the abPreventRemoval = true when calling equipitem to so if that solves it. If not you could try to put the items in an outfit and assign that to the NPC (https://www.creationkit.com/fallout4/index.php?title=SetOutfit_-_Actor) or you could reequip them in an OnLoad method (https://www.creationkit.com/fallout4/index.php?title=OnLoad_-_ObjectReference). abPreventRemoval did not work Manipulating the default outfit did work as long as the items didn't use ObjectMods, so couldn't use this option So I took your advice and now use the OnLoad event and reequip the items when needed. The script doesn't look pretty, but it works somehow... Thank you for your help @MTB
Recommended Posts
Archived
This topic is now archived and is closed to further replies.