Morrowind Mod:XDistance

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

A function added by MWSE

xDistance is similar to the original GetDistance function but takes a reference variable as the target instead of an objectid string. Like the original, it uses the editor position not the current position for non-persistent objects.

Syntax[edit]

distance (float): ref->xDistance target (reference)

Example[edit]

long PCref
long NPCref
float distance

Setx PCref to xGetRef "Player"
Setx NPCref to xGetRef "important_person"

Setx distance to PCref->xDistance NPCref

See Also[edit]

xSqrt
xHypot
xDegRad
xRadDeg
xCos
xSin
xTan
xArcCos
xArcSin
xArcTan