3djake Posted April 29, 2012 Share Posted April 29, 2012 Hi I am having trouble getting Sendanimationevent() to work. I have tried changing the spell to only be cast in right hand then using the event MRH_SpellSelfStart but nothing I do seems to work.Has any one being able to get it work to cast a spell during combat? thanks Scriptname akurdbossfight extends actor Spell Property lamespell AUTO ;assign a spell via properties when attached to NPC Spell Property enragespell AUTO ;assign a spell via properties when attached to NPC Scene property tauntscene auto Scene property tauntscene2 auto Scene property tauntscene3 auto Scene property tauntscene4 auto Scene property tauntscene5 auto Int Toggle = 0 Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If Self.GetActorValuePercentage("health") <= 0.9 && Toggle == 0 self.InterruptCast() Self.EquipSpell(lamespell, 1) Debug.SendAnimationEvent(Self, "Magic_Equip") Utility.Wait(0.3) Debug.SendAnimationEvent(Self, "DualMagic_SpellSelfStart") Toggle = 1 Utility.Wait(6) ;wait for actor to finish acting before scene Self.UnequipSpell(lamespell, 1) tauntscene.Start() ;the boss taunts/mocks the player elseif Self.GetActorValuePercentage("health") <= 0.8 && Toggle == 1 self.InterruptCast() Self.EquipSpell(lamespell, 1) Debug.SendAnimationEvent(Self, "Magic_Equip") Utility.Wait(0.3) Debug.SendAnimationEvent(Self, "DualMagic_SpellSelfStart") ;Causes him to cast the spell. tauntscene.Start() ;the boss taunts/mocks the player Toggle = 2 Utility.Wait(6) ;wait for actor to finish acting before scene Self.UnequipSpell(lamespell, 1) tauntscene.Start() ;the boss taunts/mocks the player elseif Self.GetActorValuePercentage("health") <= 0.6 && Toggle == 2 self.InterruptCast() Self.EquipSpell(enragespell, 1) Debug.SendAnimationEvent(Self, "Magic_Equip") Utility.Wait(0.3) Debug.SendAnimationEvent(Self, "DualMagic_SpellSelfStart") ;Causes him to cast the spell. Toggle = 3 ; Prevents multiple firings of this If Utility.Wait(6) ;wait for actor to finish acting before scene Self.UnequipSpell(enragespell, 1) tauntscene.Start() ;the boss taunts/mocks the player endif EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts