Jump to content

[LE] Item Dependency


Recommended Posts

I'd like some help in something I was wondering... I am about to finish my first mod called Head Hunt: it simply adds enemies' heads to the deathitem list for some of the creatures like draugr, spriggan, falmer and some more. My doubt is: is there a way we can set a dependency between the hability to equip those heads and a unique item like a belt with a hook? I guess this really would add some charm to the mod, not to say our beloved immersion...
Thanks in advance.

Link to comment
Share on other sites

Well, if you mean the armor addon, the weight painting and the free slot to be able to equip the head, I already did that. Maybe I wasn't very clear, so I apologize. What I meant is: I want the player to equip the belt first and only then he can equip the head, or it won't work. Is this possible?

Link to comment
Share on other sites

You cannot directly prevent an item from equipping when another item is not already equipped. What you can do is apply a script to the object that needs the other object to be equipped and force it to unequip if the other object is not equipped.

 

There are a few ways to go about doing it, this is only one of them:

 

 

Scriptname myObjectScript extends ObjectReference
 
Armor Property myRequiredObject Auto
Armor Property mySelfObject Auto
 
Event OnEquipped(Actor akActor)
  If !(akActor.IsEquipped(myRequiredObject)) ;required object is not equipped
    akActor.UnequipItem(mySelfObject)  ;unequip my object
  EndIf
EndEvent
Feel free to change variable names and don't forget to assign the correct data to the properties

Link to comment
Share on other sites

IsharaMeradin, I see... Thank you for the script.
I'll see what I can do.

 

 

Edit: if I was to use this script, would I have to assign this script to every head item separetely or can I just add this script to the belt and it will be applied to all items I want if inside the "()" I write the variables?

Edited by Krijanowsky
Link to comment
Share on other sites

  • Recently Browsing   0 members

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