OnCrosshairRefChange - Form

From Creation Kit
Jump to: navigation, search

SKSE Member of: Form Script

Listens for target (See notes) changes of the crosshair, for this event to be received the form must have been registered previously via RegisterForCrosshairRef.

Syntax

Event OnCrosshairRefChange(ObjectReference ref)

Parameters

  • ref: The ObjectReference that is targeted (Can be None).

Examples

Event OnInit()
	RegisterForCrosshairRef()
EndEvent
 
Event OnCrosshairRefChange(ObjectReference ref)
	If ref ;Used to determine if it's none or not.
		Debug.Trace("Crosshair had " + ref + " targeted.")
	EndIf
EndEvent

Notes

  • Targets are defined as anything the player can interact with, activators, actors, containers, doors, potions, and miscobjects can generally all be considered targets for example.

See Also