canSeeToken: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:


When a token is not visible, an empty json array is returned: '[]'
When a token is not visible, an empty json array is returned: '[]'
canSeeToken() takes a required target token id or name. A second optional argument may also be passed for the source token's id or name.


|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
canSeeToken(id|name)
canSeeToken(id|name, [id|name])
</source>
</source>
}}
}}
[[Category:Sight Function]]
[[Category:Sight Function]]
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 15:18, 8 December 2010

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

canSeeToken() Function

Introduced in version 1.3b77
Returns a json array of the points visible on the token as an enumerated list. The enumerated list will contain zero to five of the following values:
  • TOP_RIGHT
  • BOTTOM_RIGHT
  • TOP_LEFT
  • BOTTOM_LEFT
  • CENTER

When a token is not visible, an empty json array is returned: '[]'

canSeeToken() takes a required target token id or name. A second optional argument may also be passed for the source token's id or name.

Usage

canSeeToken(id|name, [id|name])