OnCrosshairOn

From GECK
Jump to: navigation, search


A function added by the Lutana NVSE plugin, now part of the JIP NVSE Plugin.

Description

Event block type that calls the UDF when the a new ref is found in the crosshair. Crosshair (ref) is passed to the UDF. Can be filtered with a form or list. Can also be filtered by Form Type via "OnCrosshairOn:25" etc.

This event functions similarly to the GetCrosshairRef function - it only tracks refs within activation distance.

Syntax

[help]
SetEventHandler "OnCrosshairOn" myUDF:userDefinedFunction 

Example with no filtering

SetEventHandler "OnCrosshairOn" MyUDF

scn MyUDF

ref rCrosshairRef

begin function {rCrosshairRef}

end function

Example with filtering by a form

SetEventHandler "OnCrosshairOn" MyUDF "first"::someForm

scn MyUDF

ref rCrosshairRef

begin function {rCrosshairRef}

end function


Example with filtering by formlist

SetEventHandler "OnCrosshairOn" MyUDF "first"::someFormList

scn MyUDF

ref rCrosshairRef

begin function {rCrosshairRef}

end function 

Example with filtering by form type 24 (armor)

SetEventHandler "OnCrosshairOff:24" MyUDF

scn MyUDF

ref rCrosshairRef

begin function {rCrosshairRef}

end function  

See Also