Activated animated meshes

Post » Sat Nov 17, 2012 10:20 am

So I have been trying to figure out a way to activate an animated mesh in the CK and I just cant sort it out. The two examples I have been toying with is the eye of magnus as the runed lexicon stand. For the eye I would like its default to be its "activated" animation with the different shards rotating around, and for the lexicon the same thing, a lexicon in the stand and "opened" with the core exposed and glowing.
I can usually sort this stuff out given time but changing the default animation sequence on these eludes me since nifskope and the ck seem to lack a direct tool to change the animation state default. Any assistance anyone could provide would be much appreciated!
cheers,
~Star Boi
User avatar
Jessica Phoenix
 
Posts: 3420
Joined: Sat Jun 24, 2006 8:49 am

Post » Sat Nov 17, 2012 1:12 am

I think you're after the PlayAnimation and PlayGamebryoAnimation functions. PlayGamebryoAnimation is easy, you just preview the object in CK and get the name of the animation you want, then do
objMagnus.PlayGamebryoAnimation("animIdle02")

I haven't messed with PlayAnimation, but I assume it's for playing Havok animations, and works in a similar way.

objMagnus.PlayAnimation("openedloop")
or possibly "openedloop.hkx".

Hope this helps. Check out the ObjectReference Script page on the CK wiki for more animation-related stuff.
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Sat Nov 17, 2012 5:17 am

Here's a link to the object reference page: http://www.creationkit.com/ObjectReference_Script there's things on there that deal with animations so this might be helpful.
User avatar
Jessie Rae Brouillette
 
Posts: 3469
Joined: Mon Dec 11, 2006 9:50 am

Post » Sat Nov 17, 2012 4:52 am

Thanks guys, i guess i shouldve checked more into the scripting aspect, i just assumed it would be mesh related ^_^
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Sat Nov 17, 2012 9:15 am

Ok so I finally sorted out which animation I need and its a havok animation as well as a gamebryo animation. I am having trouble getting my feeble little script to work though, and they wont compile. Could someone help me sort out what a script to force Idle01 and openedloop to be the default animation on a specific object would look like?
User avatar
Beat freak
 
Posts: 3403
Joined: Thu Dec 14, 2006 6:04 am

Post » Sat Nov 17, 2012 7:02 am

*bump* could really use some scripting help on this one ^_^
User avatar
Budgie
 
Posts: 3518
Joined: Sat Oct 14, 2006 2:26 pm

Post » Sat Nov 17, 2012 8:32 am

Why don't you post what you've got and we'll see about getting it straightened out :)
User avatar
Robert Bindley
 
Posts: 3474
Joined: Fri Aug 03, 2007 5:31 pm

Post » Fri Nov 16, 2012 7:08 pm

Thanks ^_^
What ive got is this, and I know its probably just missing a bunch of important things, but the object I am using is called AAEyeofMagnus01 and I have the script attached to it in the edit base window.

Scriptname AAMagnusAnimate extends ObjectReference

Event OnCellLoad

AAEyeofMagnus01.PlayGamebryoAnimation("animIdle01")
AAEyeofMagnus01.PlayAnimation("openedloop")

EndEvent
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Sat Nov 17, 2012 1:43 am

The problem is that you are referring to a variable (AAEyeofMagnus01) that hasn't been defined.

If the script is attached to the object you are trying to refer to, you should be able to substitute
Self.PlayGamebryoAnimation("animIdle01")Self.PlayAnimation("openedloop")
for

AAEyeofMagnus01.PlayGamebryoAnimation("animIdle01")AAEyeofMagnus01.PlayAnimation("openedloop")

If a script refers to an object other than the one it is attached to, then you should establish a http://www.creationkit.com/Property_Reference which you can then link to an object. If I remember correctly, the property should be defined as
ObjectReference Property AAEyeofMagnus01 Auto

The name AAEyeofMagnus01 could be replaced with almost anything. Then it would just be a matter of opening the Property window of the script and editing the value of that property. With ObjectReference properties you can select the object via the Render window.

I highly recommend getting the http://skyrim.nexusmods.com/mods/13430/?tab=2&navtag=/ajax/modimages/?user=0|:|id=13430. It has hyperlinks to wiki articles and is a good way to quickly get information related to Papyrus.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Fri Nov 16, 2012 8:10 pm

Awesome MrJack, thanks so much for helping me out with that and pointing me towards the papyrus reference, the resources id found online were apparently not helping me very much, so ill give that one a go for my next scripting adventure :happy:

EDIT:
I just tried swapping out the scripts and it still gives me a compilation error;

x:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAMagnusAnimate.psc(3,16): mismatched input '\\r\\n' expecting LPAREN
x:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAMagnusAnimate.psc(0,0): error while attempting to read script AAMagnusAnimate: Object reference not set to an instance of an object.
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm

Post » Fri Nov 16, 2012 11:26 pm

The first error should be fixed by replacing
Event OnCellLoad
with
Event OnCellLoad()
User avatar
josh evans
 
Posts: 3471
Joined: Mon Jun 04, 2007 1:37 am

Post » Fri Nov 16, 2012 7:06 pm

that did it, thanks a bundle again mrjack )

So the idle01 animation plays fine ingame but the openedloop doesnt seem to be kicking on, do havok animations need any extra scripting?

nevermind ^_^ i tried just using "open" for the havok animation and it worked great, looks like openedloop just goes off automatically if you activate the open animation.
thanks again )
User avatar
Ella Loapaga
 
Posts: 3376
Joined: Fri Mar 09, 2007 2:45 pm


Return to V - Skyrim