Jump to content

SKSE - Register Custom Animation Events 0.2

   (0 reviews)

About This File



This SKSE plugin allows registering custom animation events on ObjectReferences.
Pretty much like the existing Form.RegisterForAnimationEvent, but not limited to
the vanilla animation events.


I might need to run papyrus code triggered by animations called from arbitrary
mods. I thought it was not possible registering custom animations, until I found
these amazing work: https://github.com/towawot/DLL-GunsmithSystem






Copy the contents of the Data folder into Skyrim\Data
Or use any mod manager.






Register animation events, for a specific object reference or globally.
For example:


; registers the animation only for the player
RCAE.RegisterForAnimEventOnRef(Game.GetPlayer(), "MyAnimationEvent")


; registers another animation for any character


Then an OnAnimationEventEX callback event is called whenever a reference plays
the registered animation event. This event has some restrictions, read the notes


Event OnAnimationEventEX(ObjectReference akSource, string asEventName)
if akSource == Game.GetPlayer() && asEventName == "MyAnimationEvent"






- Won't work on ObjectReferences that are not actors. I think it could, but
currently is hardcoded just for actors (NPC or player)


- The OnAnimation Event callback only seems to work when its script points to
the player character. Actually I'm not sure on this.
I've successfully tested the callback on ReferenceAlias and ActiveMagicEffect
scripts, both pointing to the player.
The callback is not called if it's on a quest script, neither on a NPC's
I think this is because the player character is being used as a base object when
the SKSE plugin sends the event to Papyrus.


- The stuff registered is stored in memory and is lost when the game is closed






- towawot for https://github.com/towawot/DLL-GunsmithSystem


- himika for https://github.com/himika/libSKSE


- SKSE Team for http://skse.silverlock.org/



v02: Added thread safety
v01: Initial release

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Create New...