Force an actor to equip new stuff

From GECK

If you add armor to an actor via a script, the actor will not automatically equip that armor. If you add a specific armor by name, it is easy to call EquipItem to make the actor equip that specific piece of armor. But what if you added a random piece of armor from a leveled list? In this case, here is what you can do to force the actor to decide what armor (and weapons) it should be wearing:

actor.AddItem ArmorLeather 1    ;Add a known armor to the actor
actor.EquipItem ArmorLeather    ;Equip the armor we added
actor.RemoveItem ArmorLeather 1 ;Remove the armor we added

This will cause the actor to re-evaluate what items it should equip based on what is left in the actor's inventory. Use this trick after adding armor to an actor from a leveled list to make the actor equip it.

Personal tools