Timing and equipment

Post » Fri May 27, 2011 6:32 pm

In a dialog Topic result script I gave an armor item to an NPC, and set the next quest stage. The AI package that then gets selected is a follow package with weapons and armor equipped, and I see that the NPC equips a weapon already in inventory, but not the armor just given. Walking through a load door completes the equipping of the armor, but does anyone know what causes that delay?
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Fri May 27, 2011 6:53 pm

I think I've read somewhere that NPCs equip new inventory items when they evaluate their package list. But that doesn't explain why the weapon is equipped instantly. See if an EvaluatePackage call at the end of the result script makes a difference.
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Fri May 27, 2011 12:33 pm

EVP in the result script makes no difference, so I guess it's being done anyway (to get the weapon equipped).

I'm working around the immediate issue with an extra condition on a topic that checks if the armor is equipped before referring to it, so it may be moot, but I'd still like to understand what's happening in case I do something similar again.
User avatar
Harry Hearing
 
Posts: 3366
Joined: Sun Jul 22, 2007 6:19 am

Post » Fri May 27, 2011 11:37 pm

Hmm, why not just fore a NPC to equip items just given using Equipitem(for example a result dialog script also adds an ability that equips new weapon and armor and upon doing it's job it removes itself?)? Are your items selected dynamically?

brucevayne
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Fri May 27, 2011 6:58 pm

EquipItem has major issues of its own. I find that if used, the character will remove the item at the next package change, regardless of whether that is called for by weapons equipped or armor equipped flags, unless the extra force flag is used, in which case they can't remove it until a forced UnequipItem is called.

In this case, the character does equip the armor, it's just not at the same time as the weapon, and I've worked around the immediate problem it caused. I'm now fishing for an underlying cause to try and understand the engine a bit better.
User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Fri May 27, 2011 1:23 pm

Perhaps it has something to do with the actor's AI being reinitialized/brought into scope on cell change ?
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm


Return to IV - Oblivion