Jump to content

Hopefully basic script help


Recommended Posts

So, i am creating a new NPC and i was hoping that i could just attach a script to him so that he wont wear his helmet unless he is in combat. Is this possible? I know there are lots of mods for it but I was hoping that this specific NPC would do it on his own without the help of other mods.

Link to comment
Share on other sites

There's a few ways to go about it. You can't directly attach a script to the npc. Well you can, but you shouldn't. Has something to do with the templating system.

 

There's 2 obvious ways to do this:

  1. Attach a spell to the npc and have the conditions respond to combat. Have the magic effect's OnEffectStart equip the helmet, and OnEffectEnd unequip.
  2. Use a quest with a Reference Alias of your npc. Grab the OnCombatStateChanged on the ref alias and do things accordingly. https://www.creationkit.com/index.php?title=OnCombatStateChanged_-_Actor
Link to comment
Share on other sites

  • Recently Browsing   0 members

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