getTokenRotation: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(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...")
 
mNo edit summary
Line 6: Line 6:
|version=1.5.0
|version=1.5.0
|description=
|description=
This function retrieves the token's rotation angle in degrees.
Retrieves the token's rotation angle in degrees.


|usage=
|usage=

Revision as of 21:43, 6 March 2019

 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
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: