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

I didn't tried it, but what it does if you call reset as animation, akSource.PlayAnimation("Reset")? I guess it depends on the animation events that are available for the base object where you are calling the animation.

 

On the other hand, if what you want is freeze the object in this position you can use akSource.SetMotionType(akSource.Motion_Keyframed).

Edited by DieFeM
Link to comment
Share on other sites

"Reset"? I'll have to try that one out... That's the example on CK Wiki, which is a mistery to me. I went through all ENAM's in the Vanilla Idle Animations with xEdit and none had the string "Reset" to my knowledge, so either I don't understand the logic of Idle Animation (very probable :D) or Beth used a non-existing example for their Wiki.

 

WeapDraw or WeapSheath are present on Idle Animations ENAM's and you can trigger something when registering for them, so I'm a little confused on how this animation-thingy works...

Link to comment
Share on other sites

Three are ActionIdleStop and ActionIdleStopInstant Actor Actions listed in CK. ActionIdleStop and ActionIdleStopInstant do sound interesting.

 

I wonder if you might be able to use ActorRef.PlayIdleAction(ActionIdleStop) or somesuch, to cancel a playing animation?

Link to comment
Share on other sites

You r talking about cancelling ur own animation? I don't think you can do that. You can registered and event trap that action and thus perform a series of actions when that animation plays but I don't think u can stop it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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