getTokenFacing
getTokenFacing() Function
• Introduced in version 1.3b51
Gets the facing angle for the specified or current token. Default facing is down or -90 degrees. Zero degrees is along the X-axis to the right.
Usage
getTokenFacing()
getTokenFacing(id)
Parameters
id
- The id of the token to get the facing from, defaults to the current token.Note: This parameter can only be used in a Trusted Macro.
Returns
The angle in degrees or ""
if no facing has been set
Example
[h: switchToken("Mage")]
[r: token.name]: [r: r = getTokenFacing()]<br>
[h: switchToken("Elf")]
[r: token.name]: [r: r = getTokenFacing()]<br>
[h: switchToken("Hero")]
[r: token.name]: [r: r = getTokenFacing()]<br>
[h: switchToken("Troll")]
[r: token.name]: [r: r = getTokenFacing()]
Returns: