GetCrosshairRef
Revision as of 22:55, 20 January 2008 by imported>Haama (Created)
A command for Oblivion Script Extender
Syntax:
(crosshairRef:ref) GetCrosshairRef
Returns a reference to the object under the player's crosshair.
Notes
- Returns the reference of the object within activate distance of the player. You can change the distance by changing iActivatePickLength. It may take a frame for the new setting to take effect.
- Returns 0 when called during MenuMode. If you need to use the crosshair reference during MenuMode, keep checking it in GameMode. Note that this will keep the script active and running, so use it carefully.
- This function will return non-activatable references as well; use IsActivatable to determine if the reference can be activated normally.