About This File
INTRODUCTION
Â
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
Â
================================================================================
Â
INSTALLATION
Â
Copy the contents of the Data folder into Skyrim\Data
Or use any mod manager.
Â
================================================================================
Â
USAGE
Â
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
RCAE.RegisterForAnimEvent("AnotherSexyAnimation")
Â
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"
...
endIf
EndEvent
Â
================================================================================
Â
NOTES
Â
- 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
ActiveMagicEffect.
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
Â
================================================================================
Â
CREDITS
Â
- towawot for https://github.com/towawot/DLL-GunsmithSystem
Â
- himika for https://github.com/himika/libSKSE
Â
- SKSE Team for http://skse.silverlock.org/
================================================================================
CHANGE LOG
v02: Added thread safety
v01: Initial release