Morrowind Mod:XGetPCTarget

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

A function added by MWSE

xGetPCTarget returns a reference to the object in the player's crosshair or 0 if the player is not looking at anything that can be manipulated by the player.

Syntax[edit]

reference (long): xGetPCTarget

Example[edit]

long pcTarget

Setx pcTarget to xGetPCTarget
ifx ( pcTarget )   ; game crashes if you call a function on pcTarget while it's 0
    ; do things
endif

See Also[edit]

xSetRef
xRefType
xGetRef
xGetCombat
xFirstNPC
xFirstItem
xFirstStatic
xNextRef