Jump to content

Utter Garbage at Scripts. Need a Spell to add and equip items


ObLars

Recommended Posts

Hello.

 

So recently i came from a rather long hiatus from Skyrim, and i want to add a mod for myself, but i can't for the life of me find the resources i need to write a script i need.

 

I need a script that is used when i throw a spell, and i want the spell to add and equip an item to an actor (npc) , aswell as force them into a faction. How can this be done? Are there any guides out there that ive overlooked? Thanks in advance :-)

Link to comment
Share on other sites

This is pretty simple to do. If you're new to scripting, I'd recommend doing a beginner tutorial. There's a bunch out there.

 

The script would look something like this:

 

Scriptname TM_MagicEffectScript extends ActiveMagicEffect 


Faction Property MyFaction Auto 
Armor Property MyArmor Auto 

Event OnEffectStart(Actor akTarget, Actor akCaster) 
    akTarget.AddToFaction(MyFaction) 
    akTarget.EquipItem(MyArmor) 
EndEvent

Change the scriptname and attach it to a magic effect. Put the magic effect on a spell and viola it should be good to go.

 

For more scripting reference you can go here. https://www.creationkit.com/index.php?title=Category:Papyrus

Link to comment
Share on other sites

  • Recently Browsing   0 members

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