Jump to content

Auto-equip


0magma0

Recommended Posts

i tried like everything i could imagine to archive this, but i just can't get it to work...

 

i need a script that will check if, in this case a ring, is equiped and if not, equip the item

 

the script is primarly for NPC's that aquire the item by reverse-pickpocketing (yes, you can do this by making the item weightless)

Link to comment
Share on other sites

i tried like everything i could imagine to archive this, but i just can't get it to work...

 

i need a script that will check if, in this case a ring, is equiped and if not, equip the item

 

the script is primarly for NPC's that aquire the item by reverse-pickpocketing (yes, you can do this by making the item weightless)

Maybe you don't need that verification. So much time I don't do script for oblivion and so the following needs verification (it's because I don't remember if a reversed pickpocket item will trigger the object's OnAdd block)

 

So be it, create an OnAdd block in that ring's object script (you may need filter so it does not actuate on player or whatever else circumstance not the wanted) which just force equipping itself, that normally is done even if something were already equipped, in many cases just "don't" mater :rolleyes:

 

You can use the "GetSelf" function to establish the target. http://cs.elderscrolls.com/constwiki/index.php/GetSelf

PSedit: Make sure you follow the page's internal links, mainly those about dynamic items and scripting notes Modding terminology.

To get the actual NPC's ref as target from inside an item object script you'll need OBSE, but I let to you to find how to do it.

 

PS: Some time ago was discussed in a thread the reason many scripts logically perfects didn't work as intended, that's because different assumptions on the actual function's actor and target by the user and the script. Sometimes it'll be need OBSE functions for some things to work as intended.

 

You may search that CS wiki about containers/actors/targets and it's meanings for the game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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