Windchillnov Posted February 13, 2012 Posted February 13, 2012 So has anyone figured out how to make NPC's equip items in their inventory just like a follower would after the player has given them a better item?I don't think any of the procedures does this, so I assume a script will be needed.Perhaps to have a script to run OnLoad? But I can't figure out how to get a list of items in the inventory.Or maybe there is a way to manually trigger Event OnLocationChange?
Cipscis Posted February 13, 2012 Posted February 13, 2012 You need to use SetPlayerTeammate to enable that behaviour. Don't worry - it's their AI packages that actually make them act like a teammate, so you should be able to use this safely on anyone, I expect. Cipscis
Windchillnov Posted February 13, 2012 Author Posted February 13, 2012 Oh great! Thank you very much!I guess I will need to set it to true and then immediately set it to false. Maybe a short delay will be needed. Will test this soon.
Cipscis Posted February 13, 2012 Posted February 13, 2012 I'm not sure, but setting it to false might cause them to switch back to "Outfit only" mode... Worth experimenting with, at least, I guess. Cipscis
Windchillnov Posted February 13, 2012 Author Posted February 13, 2012 Ok. Tested it briefly.SetPlayerTeammate(true) by itself will not make the NPC do anything. It appears, after setting it to true, the actor needs to be disabled and then enabled in order for the NPC to wear the best armor.Also, the wiki mentioned if the player sneak or draw weapon the npc will do the same, that didn't happen during my test. I guess that part is still handled by AI packages as you said.Even so, I think it would be best to set IsPlayerTeammate to its original value, just to be safe.
Deleted65173296User Posted November 17, 2019 Posted November 17, 2019 This is not a good way that i want to make it work well.
Recommended Posts