SetNthEffectItemDuration

Post » Thu Dec 08, 2011 1:16 am

After casting a scripted spell I want to set its expire duration.

syntax from the wiki :

SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short


Now.. My spell has just 1 effect and that is a scripted effect which is supposed to control its own spells expirarion time.
My spell has this one scripted effect with duration 60. When cast different conditions should rewrite its own duration to 120, 180 or something different. What I don't know is how to put SetNthEffectItemDuration to use .. if at all is this the right function to help me out.
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Wed Dec 07, 2011 11:25 pm

figured out...

SetNthEffectItemDuration MyDurationHere TheSpellid whicheffect

MyDuration must be a number or variable ( no ( a+1 ) like stuff )
whicheffect -> 0 is first effect

And the changes are not visible while casting .. the changes are visible when readding the spell
User avatar
Roberta Obrien
 
Posts: 3499
Joined: Tue Oct 23, 2007 1:43 pm


Return to IV - Oblivion