I found out How to Play any Animation at any time!

Post » Tue Jun 19, 2012 6:02 am

Hey, just kind of wondering because I was planning to start using this method in my mod, has anyone used this function in any mods over a longer period of time without any kind of issues popping up (asking because what's written on the creation kit wiki, about this being a debug function and all that)
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Tue Jun 19, 2012 8:02 am

Thanks Universal.

Hey, just kind of wondering because I was planning to start using this method in my mod, has anyone used this function in any mods over a longer period of time without any kind of issues popping up (asking because what's written on the creation kit wiki, about this being a debug function and all that)

Well if you trigger a death animation I haven't figured out a way to undo it. :P Does that count?
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Tue Jun 19, 2012 8:43 am

Thanks Universal.



Well if you trigger a death animation I haven't figured out a way to undo it. :tongue: Does that count?

Hmm nope wasn't planning to do that so doubt it counts :P Only animations I'm using is to start sneaking, do the sneak roll, start blocking, start dodging, that kind of thing.. and they can all either be ''stopped'' by the game automatically or by me by calling the same function using the stop variant of the animation (so after startSneak I call stopSneak) :P
User avatar
Adam
 
Posts: 3446
Joined: Sat Jun 02, 2007 2:56 pm

Post » Tue Jun 19, 2012 10:41 am

It does make for a pretty hilarious scene of a fox being dragged by an invisible force along the ground in a desperate attempt to keep up with you.
User avatar
willow
 
Posts: 3414
Joined: Wed Jul 26, 2006 9:43 pm

Post » Tue Jun 19, 2012 8:42 am

I'm trying to get an actor to do one animation when I click a dialogue option, do a second one when I click the same option again, go back to the first if I click it again, etc. So alternating between the two animations by only clicking one thing.

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 5Scriptname TIF__01001D92 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_4Function Fragment_4(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODE;1=sit, 2=layif isSit == falseDebug.SendAnimationEvent(akSpeakerRef, "idleSitStart")isSit = trueelseif isSit == trueDebug.SendAnimationEvent(akSpeakerRef, "idleLayStart")isSit = falseendIf;END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentBool Property isSit = False Auto

It only ever does the first animation, in this case "idleSitStart," but I could swap the two and it would only do "idleLayStart." Any ideas?

I can't seem to get indents to work right the the [code] tag.
User avatar
Silvia Gil
 
Posts: 3433
Joined: Mon Nov 20, 2006 9:31 pm

Post » Tue Jun 19, 2012 4:32 am

I think it "forgets" values of your variables when the scripts finishes. The code simply resets when you click on a topic the second time, and isSit is set to the default "false" again.

You could use globals or create a Property variable in a quest script, I think. I would do the latter. The quest script runs only as long as the quest does but during that time it doesn't stop.

Also, indents simply change into spaces. Make 4 spaces or copy/paste the code from some other source (Notepad etc.).
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Tue Jun 19, 2012 4:04 am

After alot of testing, I must say the Animations in Skyrim are Event oriented. I can create a different way to trigger animation by creating new Anim ID under LOOSE category. Then choose the correct Event type for whatever Animation I want.
For instance, if I want to sneak, then I pick a 'sneakstart' from Event drop down box. This newly created animation has nothing todo with the existing Action/Sneak Anim, but it sends the same 'SneakStart' event to the Event Manager.

On the other hand, Animation Event are handled by procedure apparently. For instance, you can only play Idle Anim if you are not in 'Weapon Drawn' state, or you can't use 'attackStart' if you are in Idle state :(

Does any1 successful in finding a way to force any Animation to play at any time?
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Tue Jun 19, 2012 6:27 am

I am using recoil and stagger type animations. However I can call play idle on the men to stagger even when they have a weapon drawn. So I do not know what to tell you.
This is extremely bad for me as my combat mods need reliable animation calls.

What I hate the most is there is no longer a playgroup command. Play Group would select the correct animation per the TYPE of creature or NPC.
All you had to say was BLOCK and play group would pick the correct block animation out of dozens and dozens including the custom modded actors.


After alot of testing, I must say the Animations in Skyrim are Event oriented. I can create a different way to trigger animation by creating new Anim ID under LOOSE category. Then choose the correct Event type for whatever Animation I want.
For instance, if I want to sneak, then I pick a 'sneakstart' from Event drop down box. This newly created animation has nothing todo with the existing Action/Sneak Anim, but it sends the same 'SneakStart' event to the Event Manager.

On the other hand, Animation Event are handled by procedure apparently. For instance, you can only play Idle Anim if you are not in 'Weapon Drawn' state, or you can't use 'attackStart' if you are in Idle state :(

Does any1 successful in finding a way to force any Animation to play at any time?
User avatar
Beast Attire
 
Posts: 3456
Joined: Tue Oct 09, 2007 5:33 am

Previous

Return to V - Skyrim