SetOnUseAidItemEventHandler
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 an Actor consumes an Ingestible-type item.
When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the item form that was used.
Syntax
SetOnUseAidItemEventHandler handlerScript:form setORremove:1/0 itemOrList:form
Example
SetOnUseAidItemEventHandler OnUseAidItemUDF 1 Stimpak
Sets the OnUseAidItemUDF script as a handler to be invoked when an actor consumes a Stimpak.
SetOnUseAidItemEventHandler OnUseAidItemUDF 0 Stimpak
Removes the OnUseAidItemUDF script as a handler.
Notes
- As the third argument, either a single, or a Form List of Ingestible item forms may be passed.
Handler Script
A skeleton handler script for this event:
scn OnUseAidItemUDF ref rAidItem ref rActor begin Function {rAidItem} set rActor to this ; (Code) end