trilioth Posted January 29, 2013 Share Posted January 29, 2013 I created a custom companion as a learning process and I got everything working right except for this one small detail. The NPC is found holding her rifle in her hand like it's a pistol. After getting her to join me, I can fix this by telling her to switch to melee or by opening her inventory. I guess this has something to do with how I setup the companion. Shouldn't she have the weapon holstered by default? Does anyone know why this happens? Here is an Image for reference. Link to comment Share on other sites More sharing options...
luthienanarion Posted January 29, 2013 Share Posted January 29, 2013 Looks like a common AI bug that occurs when you add an item to an NPC's inventory via a script. You can usually fix it by removing something from their inventory in the same script. I usually use something like the following after any call to AddItem: additem Pencil01 1 1 removeitem Pencil01 1 1 Link to comment Share on other sites More sharing options...
trilioth Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) Looks like a common AI bug that occurs when you add an item to an NPC's inventory via a script. You can usually fix it by removing something from their inventory in the same script.... It's a non-playable special weapon using companion ammo. It was added to the inventory using the GECK. Thanks for the tip, though. I might just do that to make things look right, but I hope that it would not be necessary. Edit: I know this is really a minor problem, but I want to make sure that I am doing everything right before I end up having mistakes in released work. Edit 2: I added those two lines to the NPC's object script in the original DoOnce block and it worked. Thanks again. Edited January 30, 2013 by trilioth Link to comment Share on other sites More sharing options...
scottmack Posted January 30, 2013 Share Posted January 30, 2013 I get that bug from time to time, its not your doing it happens with every companion. Link to comment Share on other sites More sharing options...
trilioth Posted January 30, 2013 Author Share Posted January 30, 2013 I get that bug from time to time, its not your doing it happens with every companion. Thanks. That's good to know. Link to comment Share on other sites More sharing options...
trilioth Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) :dance: I figured it out! The object script of the NPC needs the variable WeaponOut.I tested this without using the additem/removeitem work around. Edit: "int WeaponOut" You don't need to set it, just declare it. Edited February 9, 2013 by trilioth Link to comment Share on other sites More sharing options...
Recommended Posts