Difference between revisions of "GetDistance"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Category links)
imported>Vswe
m (Added Search Terms)
 
(2 intermediate revisions by 2 users not shown)
Line 20: Line 20:
==Notes==
==Notes==
*[[GetDistance]] isn't completely accurate when called on an actor who is swimming. For instance, '''player.getDistance player''' will return a value within the range of 95.0 to 110.0 while the player is swimming.
*[[GetDistance]] isn't completely accurate when called on an actor who is swimming. For instance, '''player.getDistance player''' will return a value within the range of 95.0 to 110.0 while the player is swimming.
 
*[[GetDistance]] does not return reliably in worldspaces when the target is a non-actor in a different cell. For instance, '''Player.GetDistance Object''' may not give the correct distance, whereas '''Object.GetDistance Player''' consistently does.
[[Category: Functions]]
[[Category: Functions]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category: Functions (CS 1.0)]]
[[Category: Condition Functions]]
[[Category: Condition Functions]]
Line 27: Line 28:
[[Category: Movement Functions]]
[[Category: Movement Functions]]
[[Category: Movement Functions (CS 1.0)]]
[[Category: Movement Functions (CS 1.0)]]
<!-- Begin Search Terms
Get
Distance
End Search Terms -->

Latest revision as of 08:42, 20 June 2008

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  

Notes[edit | edit source]

  • GetDistance isn't completely accurate when called on an actor who is swimming. For instance, player.getDistance player will return a value within the range of 95.0 to 110.0 while the player is swimming.
  • GetDistance does not return reliably in worldspaces when the target is a non-actor in a different cell. For instance, Player.GetDistance Object may not give the correct distance, whereas Object.GetDistance Player consistently does.