Jump to content

Photo

Hopefully basic script help

papyrus scripting helmet follower

  • Please log in to reply
2 replies to this topic

#1
Pizzaman007

Pizzaman007

    Newbie

  • Members
  • Pip
  • 10 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.



#2
BigAndFlabby

BigAndFlabby

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,530 posts

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.creation...Changed_-_Actor


#3
Pizzaman007

Pizzaman007

    Newbie

  • Members
  • Pip
  • 10 posts

Thank you very much. I was completely lost before and now i have a very good foothold. I'll try those out! Thanks again







Also tagged with one or more of these keywords: papyrus, scripting, helmet, follower

Page loaded in: 0.853 seconds