Jump to content

NPC Holding Rifle by Default


trilioth

Recommended Posts

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

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 by trilioth
Link to comment
Share on other sites

  • 2 weeks later...

: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 by trilioth
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...