Need help with a spell

Post » Fri Dec 05, 2014 3:27 pm

So I have been working on a spell that adds buffs to the user. That I didn't have an issue with. My problem is that I want to know if it's possible that when the spell is activated it adds items (weapons/armor) and then equips them. Then when the spell wears off or is deactivated the items are removed from the user's inventory. If this is possible can someone tell me how or link a tutorial. Thank you in advance.
User avatar
Betsy Humpledink
 
Posts: 3443
Joined: Wed Jun 28, 2006 11:56 am

Post » Fri Dec 05, 2014 1:31 pm

Should be easy enough :)

Might not be exactly this, but something like :

Event OnEffectStart(Actor Target, Actor Caster)   Caster.AddItem(MyWeapon, 1, 1)   Caster.EquipItem(MyWeapon, 1, 1)EndEvent Event OnEffectStop(Actor Target, Actor Caster)   Caster.UnEquipItem(MyWeapon, 1, 1)   Caster.RemoveItem(MyWeapon, 1, 1)EndEvent

It's been a while, so it might be 'OnEffectFinish', and check the flags to see which is 'Silent' Add/Equip (Which will be better than having the message appear); that would be super-basic, but should do what you want.

User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm


Return to V - Skyrim