Having trouble with SpeedMult effects

Post » Sun Jun 17, 2012 1:20 pm

The spell is intended to work like this: If active is 0 and the player hits someone, when the effect starts, is sets active to 5. Every second, active loses 1 from its total value. If you hit someone (alive), it adds 1 to active (unless it would go over 5, in which case it does nothing). When active hits 0, the effect turns off.

The spell however can work like this: As the above but only play magic effect animations/particles when active is 0.

Can anyone help me out with this?

Here's the current script:
ScriptName AkaviriEffect extends ActiveMagicEffectFunction StartChain()RegisterForUpdate(1)endFunctionSpell property spellToCast autoint property active autoEvent OnEffectStart(Actor akTarget, Actor akCaster)If akTarget.IsDead()akCaster.InterruptCast()debug.Notification("Invalid target.")ReturnENDIFIf active == 0debug.Notification("Ghostblade started.")spellToCast.Cast(akCaster, None)active = 5ENDIFIf active < 5akCaster.InterruptCast()debug.Notification("Renewed. " + active + " seconds remain.")active = active + 1ENDIFEndEVENTEvent OnEffectFinish(Actor akTarget, Actor akCaster)debug.Notification("Ghostblade ended.")active = 0EndEVENTEvent OnUpdate()If active > 0active = active - 1RegisterForUpdate(1)debug.Notification(active + "seconds remain.")ENDIFIf active == 0RegisterForUpdate(1)ENDIFEndEVENT
User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Sun Jun 17, 2012 4:55 pm

Have you tried bumping it up to 400%?
User avatar
Penny Courture
 
Posts: 3438
Joined: Sat Dec 23, 2006 11:59 pm

Post » Sun Jun 17, 2012 3:07 pm

Edit: See below.
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Sun Jun 17, 2012 10:17 pm

Edit: I've got the SpeedMult finally working but have hit another snag. I've changed the first post to my current issue.
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm


Return to V - Skyrim