Weapons floating near NPC's?

Post » Tue May 17, 2011 5:11 am

Well I have run into an issue I am just clueless about. Several NPC's in my mod seem to have an issue with weapons. They float near them, but arent actually in their hands or anything. Its very weird. I noticed it when they had Police Batons. They would hold their hands out like they were fist fighting, but the batons would float nearby their hands. Then one of my testers also noticed and took these screen shots. This time when they are holding assault rifles.

http://www.mediafire...c1fbe2ff66g.jpg
http://www.mediafire...a17bd91b76g.jpg

The guns are literally replicas of Assault rifles. I just opened it, gave a new form ID, then said yes make a new form. I have a small script on them, but all it does is prevent the player from picking them up which should not affect them. Does anyone know what causes this and how I can fix it? Like I said, it seems to happen with multiple weapons, so is something wrong with the NPC's?
User avatar
Katie Samuel
 
Posts: 3384
Joined: Tue Oct 10, 2006 5:20 am

Post » Tue May 17, 2011 12:32 am

Well I have run into an issue I am just clueless about. Several NPC's in my mod seem to have an issue with weapons. They float near them, but arent actually in their hands or anything. Its very weird. I noticed it when they had Police Batons. They would hold their hands out like they were fist fighting, but the batons would float nearby their hands. Then one of my testers also noticed and took these screen shots. This time when they are holding assault rifles.

http://www.mediafire...c1fbe2ff66g.jpg
http://www.mediafire...a17bd91b76g.jpg

The guns are literally replicas of Assault rifles. I just opened it, gave a new form ID, then said yes make a new form. I have a small script on them, but all it does is prevent the player from picking them up which should not affect them. Does anyone know what causes this and how I can fix it? Like I said, it seems to happen with multiple weapons, so is something wrong with the NPC's?


If you do an 'openteammatecontainer 1' on them from the console, then close, does it fix it? then it's the 'wristwatch weapon' bug. You may also see the weapon doubled up in their inventory.
I've seen different ways of correcting this, but my favorite way of detecting the condition on my followers through script is to get the weapon health with npcRef.GetWeaponHealthPerc. It will always report as 100% when the weapon is on their wrist. Then you can do something like this:

npc.setalert 0 (if you have them at alert)npcRef.unequipitem rweaponnpcRef.removeitem rweapon 1 wait for a secondnpcRef.additemhealthpercent rweapon 1 .60npcRef.equipItem rweaponnpcRef.setalert 1 (if you want)


The problem gets really bad if the npc's weapon is out (setalert 1) and goes through doors to another cell.
User avatar
Nina Mccormick
 
Posts: 3507
Joined: Mon Sep 18, 2006 5:38 pm

Post » Tue May 17, 2011 9:40 am

Ok thanks I will try this. I would rather have a solution that didnt involve randomly unequiping then re equiping their weapons. Especially since I cannot tell when it occurs...

It does not always happen. Sometimes I play and they hold their weapons normally. So is there just something in the mod or FO3edit I can change/do once to stop this from occuring?
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Tue May 17, 2011 11:13 am

Equip trick... Make an armor with no model and uses a spare body slot.
Have the NPC add it, equip it, then remove it (without UNequipping it first).
If you add it to the NPCs script OnLoad block, you probably won't ever see it again.
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Tue May 17, 2011 8:49 am

Hmm not a bad idea. I will that and see if it fixes it. Thanks to both of you, I'll let you know how it goes.
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Tue May 17, 2011 2:28 pm

This is another example of the issue I had a little while ago with one of my NPCs getting frozen after equipping new items on him, he also had the wrist watch bug. I am sure the solutions suggested so far will work.
User avatar
Jerry Jr. Ortiz
 
Posts: 3457
Joined: Fri Nov 23, 2007 12:39 pm


Return to Fallout 3