getDistanceToXY
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 tofalse
(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.