fraxan1982 Posted August 22, 2017 Share Posted August 22, 2017 Hi there. I have just got into nodding with Fallout 4, and have grasped the basics of scripting, but I am having trouble with scripting animations. Basically I can't seem to get animations to play via script, either on objects with custom animations, or quite simply on npcs with vanilla animations. I have looked into the creation kit literature and I can't seem to make anything work. I have tried the likes of example.playanimation and example.playgamebryoanimation and nothing has happened. Would any of you lovely modders out there please point me in the right direction, and perhaps post an example script? That would be greatly appreciated. Link to comment Share on other sites More sharing options...
cypher2012 Posted August 26, 2017 Share Posted August 26, 2017 Here is a sample script from one of my projects. If I remember right, you need to make sure that you are referencing a 'MoveableStatic' object. If you reference jsut a 'Static' it won't animate, even if it has animations attached to it's nif file. Scriptname CMR:CMR_ActivateMonorail extends ObjectReference ObjectReference Property CMR_MonorailAnimObject Auto ObjectReference Property CMR_XExitMarker Auto ObjectReference Property CMR_XEntryMarker Auto Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().MoveTo(CMR_XEntryMarker) CMR_MonorailAnimObject.PlayGamebryoAnimation("TestAnimSq", true) Utility.Wait(85.0) Game.GetPlayer().MoveTo(CMR_XExitMarker) EndEvent Link to comment Share on other sites More sharing options...
deadbeeftffn Posted August 26, 2017 Share Posted August 26, 2017 ... If I remember right, you need to make sure that you are referencing a 'MoveableStatic' object. If you reference jsut a 'Static' it won't animate, even if it has animations attached to it's nif file.Your remembrance is wrong. :wink: If a NIF has a NIControllerManager it can be animated. It doesn't make a difference if it is assigend to a pure static or moveable static object. Link to comment Share on other sites More sharing options...
deadbeeftffn Posted August 26, 2017 Share Posted August 26, 2017 (edited) PlayGamebryoAnimation() takes three parameters. Most important is the first parameter 'Name of the animated node'. You may find this name in CK in the preview window in the leftmost box on the bottom. The second parameter is a bool. If it is true, the animation will start over. Ohterwise it will be played only once. (Which is not always true, though....)If the object does not have 'GamebryoAnimations' but 'Havoc Anims', you could use PlayAnimation() to activate the anim. Again, you may find the names in the preview window.Anyway, sometimes it's absolutely enervating to get animations working :sick: Edited August 26, 2017 by deadbeeftffn Link to comment Share on other sites More sharing options...
Recommended Posts