Jump to content

[LE] pls help, where i make an error with dodge animations


myav

Recommended Posts

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
endevent

This magiceffect added to NPC.

 

When i hit npc, i receive messages: DodgeLeft, DodgeRight, DodgeBack, so it means:

1. script - working

2. game detected OnHit

3. 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 by myav
Link to comment
Share on other sites

  • Recently Browsing   0 members

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