scripted spell effects

Post » Tue Jun 19, 2012 3:02 pm

I am trying to make a scroll run a script when its used, but I cannot find the right event for it. I tried oneffect start with a message box as the result for testing but it doesn't work. Any suggestions on how to implement the right event? I looked over the event list thouroughly and multiple times.
User avatar
Nikki Lawrence
 
Posts: 3317
Joined: Sat Jul 01, 2006 2:27 am

Post » Tue Jun 19, 2012 1:18 pm

If you want a scroll that runs a script when you click on it in the inventory, try OnEquipped or OnRead.
User avatar
Cool Man Sam
 
Posts: 3392
Joined: Thu May 10, 2007 1:19 pm

Post » Tue Jun 19, 2012 2:27 pm

OnEffectStart() is the correct approach if you want the script to something when the scroll's spell is used. Note though: The script must be attached to the MagicEffect not the Spell/Scroll.

Something like that should be working:

Scriptname EffectTest extends ActiveMagicEffectEvent OnEffectStart(Actor akTarget, Actor akCaster)    Debug.MessageBox("It works!!!")EndEvent

Attach that Script to the Magic Effect of your Scroll and it should be working.
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am

Post » Tue Jun 19, 2012 7:34 pm

Jason is on the ball :) Exactly how I would do it.
User avatar
Sophh
 
Posts: 3381
Joined: Tue Aug 08, 2006 11:58 pm


Return to V - Skyrim