Jump to content

Casting two spells at the same time from a script Issues


BigKevSexyMan

Recommended Posts

Hi, I'm having an issue with a script. What I want to do is cast two spells at the same time when you raise your shield, but when I do that, it only does the last one(Actually, it probably does one, then stops instantly and does the other). The Spell has to be a concentration self type.

 

Finally, here's my script:

 

Scriptname _BKSM_ShieldBlockEffect extends activemagiceffect

String AnimationEnter = "blockStartOut"
String AnimationExit = "blockStop"

SPELL Property AbilityAdded  Auto
SPELL Property AbilityAdded2  Auto

Event OnAnimationEvent(ObjectReference akSource, string asEventName)

if (asEventName == AnimationEnter)

 AbilityAdded.Cast(akSource , akSource )
 AbilityAdded2.Cast(akSource , akSource )

endif

if (asEventName == AnimationExit)

 (akSource as Actor).DispelSpell(AbilityAdded)
 akSource.InterruptCast()

endif

EndEvent

Event OnEffectStart(Actor akTarget, Actor akCaster)

RegisterForAnimationEvent(akTarget, AnimationEnter)
RegisterForAnimationEvent(akTarget, AnimationExit)

EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)

UnregisterForAnimationEvent(akTarget, AnimationEnter)
UnregisterForAnimationEvent(akTarget, AnimationExit)

EndEvent

 

It works for one spell, but it won't do two. It's a problem, because this is supposed to be an enchantment and when someone dual enchants, only one enchantment will work.

 

Any help would be appreciated.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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