Jump to content

Stop/interrupt animation with a script


jags78

Recommended Posts

Hi guys and gals

 

As the title says, I'd like interrupt a animation the moment it wants to play. This is how far I came in my head.

 

Here a SAMPLE code:

RegisterForAnimationEvent(self, "AnimToInterrupt")
 
Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    if akSource == self && asEventName == "AnimToInterrupt"
        InterruptAnim()
    endIf
endEvent

Function InterruptAnim()
    ; WHAT NOW?!?
EndFunction

Maybe I just sat to long in front of my computer am I'm just not seeing it... But I cannot find a function/call/script-magic to interrupt the animation.

 

Is it even possible to interrupt/stop an animation the moment it starts without noticing to much?

 

Thx in advanced

 

jags78

 

P.S.: It's not an endless looped animation... If that should matter

 

Link to comment
Share on other sites

Is not possible. The engine may dispatch an event when the animation starts, but the handler from your script may be called long after the animation finished. Is not synchronous, the engine won't wait for the Papyrus script to handle the event...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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