myav Posted February 10, 2020 Share Posted February 10, 2020 (edited) Event OnEffectStart(Actor akTarget, Actor akCaster) selfactor = akTarget EndEvent Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) utility.Wait(0.050000) temp = Utility.RandomInt(1,100) utility.Wait(0.050000) temp2 = Utility.RandomInt(1,100) dodgechance = 50 if temp < dodgechance GoToState("Busy") ; selfactor.SetGhost(true) selfactor.DamageAV("Stamina", 10 as float) Debug.SendAnimationEvent(selfactor as objectreference, "staggerStop") Utility.wait(0.1) If(selfactor.GetEquippedItemType(1) < 7) If(temp2 <=25) Debug.Notification("DodgeLeft") Debug.SendAnimationEvent(selfactor as objectreference, "DodgeLeft") ElseIf(temp2 <= 50) Debug.Notification("DodgeRight") Debug.SendAnimationEvent(selfactor as objectreference, "DodgeRight") Else Debug.Notification("DodgeBack") Debug.SendAnimationEvent(selfactor as objectreference, "DodgeBack") EndIf endif endif endeventThis magiceffect added to NPC. When i hit npc, i receive messages: DodgeLeft, DodgeRight, DodgeBack, so it means:1. script - working2. game detected OnHit3. Random chances pass check/ But.. no dodge :-P and npc continue to attack me, during these messages)) Also, i have tested the same but without ghost and the next: Debug.SendAnimationEvent(selfactor, "DodgeLeft")And the same is with blocking (( no block and only hits from NPC: Debug.SendAnimationEvent(selfactor as objectreference, "blockStart")Who can explain, what i miss? and why they continue to hit me, without dodge/block animations) Edited February 10, 2020 by myav Link to comment Share on other sites More sharing options...
myav Posted February 11, 2020 Author Share Posted February 11, 2020 i have checked dodge mods and battle mods where npc doing dodges.. And I have replaced "SendAnimationEvent" to PlayIdle(CustomDodgeIdle) Now dodge - works, and my topic question is closed. Link to comment Share on other sites More sharing options...
Recommended Posts