Jump to content

[LE] How to get animation event names for use in Papyrus?


Surilindur

Recommended Posts

Hello,

 

I have a mod project under construction and it has a slight issue with a reloading animation playing when inappropriate. To solve this, I have thought about using the RegisterForAnimationEvent function combined with a SendAnimationEvent. On player character, that is, not on NPCs (there is a warning on the wiki page about it).

 

The problem is, the Creation Kit Wiki only lists a limited number of animation event names and does not seem to include the crossbow ones. I would need the starting event of the crossbow reloading animation for the event to fire when appropriate. The animations would seem to be in a .hkx format or something like that, and I have not managed to open them using NifSkope. Yes, I am a total noob when it comes to animations and such. Also meshes and textures. Lottery with various possible names for the reload animation starting event has gotten me nowhere this far.

 

How would I get the animation event names from the files? Are they in the files as I suspect? Or is there a better way to prevent an animation from playing? I only need that one name at the moment, though. If someone has run into it, I would love to hear it.

 

Thank you. :)

Link to comment
Share on other sites

Yes, you can read behavior files to find the animation events that have a transition in a state. (List of programs to get started) If you are lucky, there would be variables attached to certain parts of the file so you can simply change the variable values by script to disable animations (stuff like bNoStagger == false would probably disable staggering, for example).

 

Check the Updates.bsa or Dawnguard.bsa since crossbow animations are from DLC. Animations and behaviors are found in meshes/actors/character.

Link to comment
Share on other sites

Go to Gameplay > Animations and look for the graph corresponding to the character race u wanna use.
For humanoids, 0_Master.hkx is the behaviour graph.

To your right, there is a drop down menu labeled "Anim Event" for every animation. Using the corresponding AnimEvent always works.

For example, Death has the animation event "Ragdoll".
Using "Ragdoll" in papyrus debug.sendanimationevent always works.
Always make sure to use the animevent tied to the animations. To get out of whatever behaviour ur in, use "ResetGraph" to restore the actor's normal behaviour after ur done doing what u want them to do.

Edited by Di0nysys
Link to comment
Share on other sites

Okay. Thank you both. Di0nysys' advice for finding the names seems so easy I will check it first. Never would have thought about it. If someone has an account on the CK Wiki, it might be handy to have that explained in the Notes section, for example, in case someone else is looking for the names, as well. Or maybe at the top of the page? Perhaps? This is the one I have found thus far: http://www.creationkit.com/Animation_Events

 

I have been a bit busy with real life at the moment, but I will hopefully have some time for modding tonight. I will report back what happens. Also thank you for the "ResetGraph" thingy, is it a command? I did not seem to find it in the wiki. Or is is a special Anim Event?

 

The idea is just to stop the crossbow reloading animation when it starts to play, so that it will not be played (at least completely through) when inappropriate. When I remove bolts in an OnMenuClose event, the game will play the reloading animation the moment the menu closes, despite all equipped bolts having been removed from player. So it plays the animation, but nothing is placed on the crossbow. This is the thing I need to fix. In case it was not too clearly put in the original message.

 

Thank you. I will report back with what happens. :)

Link to comment
Share on other sites

Okay, so there is a huge list of Anim Events in a dropdown menu. Just like sLoPpYdOtBiGhOlE said. In the

 

toolbar > Gameplay > Animations > Actors\Character\Behaviors\0_Master.hkx

 

The I just picked one under it, and opened the dropdown menu approximately in the middle of the all the other options. The names were relatively self-explanatory, as well. I managed to find the following ones in it:

  • reload
  • ReloadFast
  • reloadStart
  • reloadStop

I think, cannot remember exactly. For some reason, when I register for the event upon opening a menu, the one that is registered after that (when the player closes menu and the reloading animation plays) is the "reload" one. I tried "reloadStart", but it did not work. Strange. But at least the animation stops now, as intended. Sending "reloadStop" makes it end upon start.

 

I will see if I can make it better somehow. At least there is now an optional way to prevent the animation from playing completely. Which is disabled by default. Thank you all for your time. Now my projects are seeing some progress again. :)

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...

Hmmm.....

This is Interesting, I have problems with muzzleflash effect that look inappropriate position after changing view 1st person to 3rdperson, no matter any muzzle flash nif files that i put in.

 

The only thing to reset my muzzle flash effect is, getting start a new animation event then the muzzle flash FX always in the right position of the weapon. But still changing view again make bugy, the muzzle flash spawn position is in the first view of the animation event, but never register to new view of 3rdperson which is the same animation event as 1st person view.

Oh my....I think this is the problems.

 

I have same crossbow project too, and I always edit the hkx files in xml, there is some animation event in some of the lines with certain time of micro second.

 

Im going to try this, perhaps add some condition of camera view event maybe.

Edited by HanzSteiger
Link to comment
Share on other sites

In the CK when you preview a object with an animation you can see the call names for them listed.

Also there is a generic way to call them like ... trigger01 is the 1st one, trigger02 is the 2nd one, exc exc ...

and reset01 (if it has a reset).

 

I think there are two different types of animations as the 1st way don't seem to always work ...

Edited by NexusComa
Link to comment
Share on other sites

  • Recently Browsing   0 members

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