Jump to content

Unequip script issues


Archdaemon21

Recommended Posts

Beginning scripter here, having issues with this script and its probably something staggeringly obvious. I have looked at some of the bethesda unequip and equip scripts, but as soon as I add anything it all goes wrong. I am just posting here in the hope someone can point me in the right direction.

 

Here is the script:

 

Scriptname GalluVampLordUnequipScript extends activemagiceffect
{On equip, unequips all items unless equipped item has the specified keyword.}

Keyword Property ArmorGalluVampireLordFit Auto

EVENT onEquip(actor aksubject, ObjectReference akReference)
if ObjectReference haskeyword ArmorGalluVampireLordFit == 1
endif
else
if ObjectReference haskeyword ArmorGalluVampireLordFit == 0
unEquipAll()
Debug.Trace("This armor doesn't fit")
endEVENT

 

The aim of the script is to automatically unequip all items (for simplicities sake) when an item without the keyword is equipped, for when playing a vampire lord, or the custom gallu race based on it, with access to the inventory. Grimoas vampire lord and the daedric vampire lord mods have resources for certain armors, but equipping armors without armor addons for their armor rating/enchantments feels like cheating, and I want to prevent it.

 

The script is going to be attatched to a magic effect which will be added to a racial ability. Is it possible to reference the subject of the spell (self) in this way? Or am I going to have to add an actor script to the player character?

 

Also, I am not going to distribute the resources of those mods, if anyone was wondering, this is for personal mods.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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