Forzane Posted October 25, 2011 Share Posted October 25, 2011 ok i have this idea for a mod of mine...i have two sets of Guards ...Interior and Exterior...i would like to make it so that there is 2 containers in the mod ...one for Interior and one for Exterior and i need to be able to put Player chosen armour or weapons and then have those guard of that group automatically switch to those items....i need to find a way to make one group of guards to use one containers as their Inventory for equipment and make the other group of guards use the other container for their inventory to be able to have Player chosen equipment on both guards.....as to let player put in a certain Armor and/or Weapon and all NPC linked to that container use that as what they have equipped..equipment containers for a group of NPC guards to wear like make all of them of one group use it as a inventory container Link to comment Share on other sites More sharing options...
jedijas Posted May 7, 2012 Share Posted May 7, 2012 After reading through this post I thought a few things (mainly scripts) need to happen here: 1. The Guards would need different Faction IDs. 2. I would suggest using a script so that whatever is in the box is duplicated and equipped onto the Guards. Obviously here you would only be able to have one set of weapons/amour in the chests at any one time. The Guards would need a really bad piece of armour as their default armor/weapons (as the NPCs will choose the highest damage/protection weapon/armor). I am not really that good at scripting but I will look into this for you. I hope this helps,Jedijas Link to comment Share on other sites More sharing options...
b3w4r3 Posted May 8, 2012 Share Posted May 8, 2012 (edited) I can make this happen. It needs NVSE to work, but it would work 100% with any armor and weapons you put in the containers. After I get home from work I'll post the scripts you need on the containers. Edit: Here's the script, untested so if there's a problem let me know the details of what happens. Your container gets this script attached to it, and you need to substitute the MyNPC1Ref with the reference name of the NPC who will use this armor. I added three NPCs but you can use more or less depending on how many you have, just edit the code to fit. This script will force equip the items on the NPC meaning you won't be able to remove them through their inventory share. It will equip all NPCs with the armor and weapon you choose, just one of each in the chest is all you add (more than one will cause problems), they will be equiped on each NPC, then removed from the container. if you put other items in there like ammo or anything other than armor and weapon those will be added to your NPCs inventory also. scn ForceScript ref target1 ref item ref me short invobj short init short button short active Begin OnActivate if init == 0 set init to 1 set me to getself activate endif End Begin GameMode if init == 1 set target1 to MyNPC1Ref ;your first NPC reference name set init to 20 set invobj to 0 elseif init == 2 set target1 to MyNPC2Ref ;your second NPC reference name set init to 20 set invobj to 0 elseif init == 3 set target1 to MyNPC3Ref ;your third NPC reference name set init to 20 set invobj to 0 else set init to 30 endif if init == 20 label 30 set item to me.GetInventoryObject invobj if item != 0 if gettype item == 24 || gettype item == 26 || gettype item == 40 target1.additem item 1 target1.equipitem item 1 else Target1.additem item 1 endif set invobj to invobj + 1 goto 30 endif set init to init + 1 endif if init == 30 me.removeallitems set init to 0 endif end Edited May 8, 2012 by b3w4r3 Link to comment Share on other sites More sharing options...
Recommended Posts