getTokenRotation

From RPTools Wiki
Revision as of 22:56, 16 February 2019 by Azhrei (talk | contribs) (Created page with "{{stub|No examples yet.}} {{MacroFunction |name= getTokenRotation |proposed=false |trusted=false |version=1.5.0 |description= This function retrieves the token's rotation angl...")
(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.
 This article needs: No examples yet.

getTokenRotation() Function

Introduced in version 1.5.0
This function retrieves the token's rotation angle in degrees.

Usage

getTokenRotation()
getTokenRotation(id)

Parameters

  • id - The token id of the token to retrieve the rotation angle. Defaults to the Current Token.

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

Result
The function returns the token's rotation as a numeric value measured in degrees.

Example

Needs real example showing possible return values. I recall there was some discussion about whether the return value went from -90 to +270 or from 0 to 360. It calls Token.getFacingInDegrees().
[r: getTokenRotation()]
Returns: