SetOnPCTargetChangeEventHandler
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 the actor reference under the reticle (i.e. the actor the player is aiming at) is changed.
When invoked, the script is passed with a single argument: the target actor (which may be null if there is none).
Syntax
SetOnPCTargetChangeEventHandler handlerScript:ref setORremove:1/0
Example
SetOnPCTargetChangeEventHandler OnPCTargetChangeUDF 1
Sets the OnPCTargetChangeUDF script as a handler.
SetOnPCTargetChangeEventHandler OnPCTargetChangeUDF 0
Removes the OnPCTargetChangeUDF script as a handler.
Notes
- This is directly affected by the fAutoAimMaxDistance game setting.
Handler Script
A skeleton handler script for this event:
scn OnPCTargetChangeUDF ref rTargetRef begin Function {rTargetRef} (code) end