Jump to content

Scripting custom armor effect, could use some help.


Recommended Posts

I am trying to create a ring that, when worn, makes any attack you do to npcs sets the npc to be protected instead of essential. In my experience mods that set all essential npcs to protected don't always work on pre-existing saves and could be overridden from quests.

I have learned a little bit of scripting trying to make this mod and I've made an enchantment I can put on any custom weapons I make that has the intended affect. I made the following script:

 

Event OnEffectStart(Actor akTarget, Actor akCaster)
     Actor target = akTarget
     if (target.IsEssential())
          target.SetProtected(true)
          target.SetEssential(false)
     EndIf
EndEvent

I would like to have a ring that applies this affect for more versatility and have no idea how. Any help would be appreciated.

Edited by Guest
Link to comment
Share on other sites

  • Recently Browsing   0 members

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