Open main menu

UESPWiki β

Morrowind Mod:XDistance

< Mod / Morrowind: Morrowind Mod: MWSE

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.

SyntaxEdit

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

ExampleEdit

long PCref
long NPCref
float distance

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

Setx distance to PCref->xDistance NPCref

See AlsoEdit