Srende Posted September 18, 2014 Posted September 18, 2014 I'm trying to make a trade dialogue for certain NPCs similar to followers, where you could open their inventory from dialogue. This works fine, but I can't figure out why they don't equip the items or how to make them do that. As far as I can tell, vanilla followers use the same function: akActor.OpenInventory(), which is the extent of the topic info fragment script on the followers and on my own dialogue. I've also set the NPC outfit to an empty one prior to opening the inventory so their current outfit isn't even "blocking" it. Sure, I could just go through their inventory afterwards and equip everything forcibly, but it's not exactly an ideal solution I think. Any ideas?
Srende Posted September 18, 2014 Author Posted September 18, 2014 Whee, I figured it out on a hunch a minute after posting this Turns out they only automatically equip them if they are player teammates. So now my script looks like this, incase someone is having the same issue: bool team = akSpeaker.IsPlayerTeammate() If !team akSpeaker.SetPlayerTeammate() EndIf akSpeaker.OpenInventory(true) If !team Utility.Wait(2.0) ; Shouldnt advance while in the inventory menu akSpeaker.SetPlayerTeammate(false, false) EndIf So it checks if the NPC is already a teammate and adds it temporarily if not.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.