Check out our 2024 Retrospective for a look back at events that shaped the wiki during 2024.

Morrowind Mod:XGetRef

The UESPWiki – Your source for The Elder Scrolls since 1995

A function added by MWSE.

xGetRef gets a reference to one of the active objects that match the object ID. An active object is an object in one of the loaded cells, or a persistent object such as an NPC.

Syntax[edit]

reference (long): ref->xGetRef object_id (string)

Example[edit]

long player

SetX player to xGetRef "Player"

See Also[edit]

xSetRef
xRefType
xGetCombat
xGetPCTarget
xFirstNPC
xFirstItem
xFirstStatic
xNextRef