Jump to content

Scriptting Command Help (Player.EquipItem X)


reaper9111

Recommended Posts

Hey guys, i have a script where i need the female actor only to equip and item (clothing item) witch is not to be in theyr inventory at any time...

and at some point to be unequiped...

 

what i'm looking for "back in oblivion" would be something like this:

 

If GetGender == (Female)

Actor.Additem X 1

Actor.EquipItem X

 

at some point in the script

 

Actor.GetItemCount X == 1

Actor.UnEquipItem X

Actor.RemoveItem X 1

 

Back in oblivion actor needed to have in theyr inventory the item the scrupt would equip to them/ unequip... that why i add them here...

 

Can anyone help me here please ?

Link to comment
Share on other sites

CKwiki says that the NPC doesn't need to have the item in the inventory, but is recommended to call a "additem" anyway.

 

The GetGender is now GetSex http://www.creationkit.com/GetSex_-_ActorBase

 

So your script would be something like this

 

If (myNPC.GetSex() == 1)
      myNPC.AddItem(myItem)
      myNPC.EquipItem(myItem)

 

If the item you want to equip is an armor or cloth, you may need to call a

UnEquipItem()

on the default outfit (don't know if needed, but i'm talking about the "Lydia bug" where she always uses her default armor)

 

EDIT: also, you will need properties (i never modded Oblivion, but i think properties have been introduced with Skyrim and papyrus right?)

Edited by gasti89
Link to comment
Share on other sites

  • Recently Browsing   0 members

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