GetDistance

From the CreationKit Wiki
Revision as of 02:42, 5 February 2015 by imported>DavidJCobb (That scripting syntax is from one of the older games, if I'm not utterly mistaken.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns the distance in units from the calling object to the Reference "ObjectID".

Syntax:

GetDistance ObjectID

Examples:

GetDistance TestMarkerRef
Set distance to GetDistance Player
Ref Actor
 
Begin OnActivate 
  set Actor to GetActionRef 
  if Getdistance Actor > 70
    messagebox "Come closer my friend"
  endif
end  

Papyrus Version

ObjectReference.GetDistance (Papyrus)