getDistanceToXY: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial write-up.)
 
mNo edit summary
Line 7: Line 7:


|usage=
|usage=
<source lang="mtmacro">
<source lang="mtmacro" line>
getDistanceToXY(x, y)
getDistanceToXY(x, y)
</source>
</source>
<source lang="mtmacro">
<source lang="mtmacro" line>
getDistanceToXY(x, y, units)
getDistanceToXY(x, y, units)
</source>
</source>
<source lang="mtmacro">
<source lang="mtmacro" line>
getDistanceToXY(x, y, units, source)
getDistanceToXY(x, y, units, source)
</source>
</source>

Revision as of 23:24, 9 March 2009

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

getDistanceToXY() Function

Introduced in version 1.3b51
Gets the distance to a target grid cell.

Usage

getDistanceToXY(x, y)
getDistanceToXY(x, y, units)
getDistanceToXY(x, y, units, source)

Parameters

  • x - The X coordinate of the target grid cell.
  • y - The Y coordinate of the target grid cell.
  • units - If set to false(0) the distance is returned in cells. Default is returning Distance Per Cell units.
  • source - The id of the token to measure the distance from. Default is the current token.