philip141091 Posted February 9, 2012 Share Posted February 9, 2012 I cant for the life of me figure this one out, but here goes: I have an animation, i want to run this animation on an npc using a script. (The animation works fine if i replace one of the default animation btw) How do i go about creating a animation event that i can call with PlayAnimation()? Link to comment Share on other sites More sharing options...
philip141091 Posted February 9, 2012 Author Share Posted February 9, 2012 Seriously no one knows how to add and play animations? Link to comment Share on other sites More sharing options...
KraGeRzR Posted February 14, 2012 Share Posted February 14, 2012 Just found this thread after some time. I wonder if it's still open. Anyway: I checked out the Sawmill scripts in the CK, to check how they run animations, since I was checking them for info on another thing - and found out some interesting details. The script in question is ResourceObjectSawmillScript.psc, and uses stuff like this: Event OnLoad() RegisterForAnimationEvent(self, "DestructionComplete") ; sabotage complete -- *** ALL children scripts of ResourceObjectScript MUST register for this animation RegisterForAnimationEvent(self, "MillLogChuteIdle") ; log is loaded, ready to cut RegisterForAnimationEvent(self, "MillLogIdleReset") ; log cutting animation complete RegisterForAnimationEvent(self, "MillLogPileLoadStart") ; log loading animation started endEvent Link to comment Share on other sites More sharing options...
expired6978 Posted February 14, 2012 Share Posted February 14, 2012 (edited) Those just register the animations into the event system, if your looking to add new animations you would need to modify the master behavior files because that's where it seems all of the animations are referenced. The hkxcmd version I have does not reverse the behavior files, which is rather unfortunate because that file seems to be the only link to both the CK and animations. Edited February 14, 2012 by expired6978 Link to comment Share on other sites More sharing options...
SirArindel Posted February 14, 2012 Share Posted February 14, 2012 (edited) Those colored with orange you must include in your script to start an animation: Idle Property MyAnimation AUTO Event OnEffectStart(Actor akTarget, Actor akCaster)if Game.GetPlayer().IsInCombat() == 0Game.Getplayer().playidle(MyAnimation)endif EndEvent The rest is just an example applied to an magiceffect. Don't forget to set the the property to your animation within the activator or whatever you use to start the script. You can also use PlayAnimation instead of PlayIdle in case your animation is not a idle one. Replace the property too with the respective one, dunno if there's Animation. Edited February 14, 2012 by omega2008 Link to comment Share on other sites More sharing options...
romantiker12 Posted October 3, 2018 Share Posted October 3, 2018 That simple script is a perfect helper !!! ;-)))))))))) Link to comment Share on other sites More sharing options...
fore Posted October 4, 2018 Share Posted October 4, 2018 That simple script is a perfect helper !!! ;-)))))))))) You necro a 6 1/2 years old post to point to a script snippet which doesn't do what was asked? lol Link to comment Share on other sites More sharing options...
Recommended Posts