SetOnRagdollEventHandler
From GECK
A function added by the JIP NVSE Plugin.
Description
Sets/removes the specified UDF Script as a handler that will be invoked in the event any Actor is "ragdolled" (i.e. upon death, paralysis, knockdown, low fatigue, or unconsciousness).
To check if an actor is unconscious, use GetLifeState.
When invoked, the script is passed with the Actor as the calling reference ("this").
Syntax
SetOnRagdollEventHandler handlerScript:form setORremove:1/0
Example
SetOnRagdollEventHandler OnRagdollUDF 1
Sets the OnRagdollUDF script as a handler to be invoked when an actor is ragdolled.
SetOnRagdollEventHandler OnRagdollUDF 0
Removes the OnRagdollUDF script as a handler.
Handler Script
A skeleton handler script for this event:
scn OnRagdollUDF ref rActor begin Function {} set rActor to this ; (Code) end
Notes
- Event must be registered in GameMode block (not MenuMode 4) as it is flushed every game load. This also means GetGameRestarted is NOT a viable option to set this event for the session. Instead consider using GetGameLoaded to (re)set the event handler.