getDistance

From RPTools Wiki
Revision as of 21:59, 9 March 2009 by Verisimilar (talk | contribs) (Initial write-up.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

getDistance() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b51
Returns the distance between two tokens.

Usage

getDistance(target)
getDistance(target, units)
getDistance(target, units, source)

Parameters

  • target - The id of the token that the distance is measured to.
  • units - If set to false(0), the distance is given in cells, otherwise the default is to return the distance in Distance Per Cell units.
  • source - The id of the token to measure the distance from, the default is the current token.