js:Token: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
|name=token.getNotes | |name=token.getNotes | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the notes field of the token. | Returns the notes field of the token. | ||
Line 17: | Line 17: | ||
|name=token.setNotes | |name=token.setNotes | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Sets the notes field of the token. | Sets the notes field of the token. | ||
Line 29: | Line 29: | ||
|name=token.getName | |name=token.getName | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the name of the token. | Returns the name of the token. | ||
Line 41: | Line 41: | ||
|name=token.setName | |name=token.setName | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Sets the name of the token | Sets the name of the token | ||
Line 53: | Line 53: | ||
|name=token.hasSight | |name=token.hasSight | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns true if sight is enabled for the token | Returns true if sight is enabled for the token | ||
Line 65: | Line 65: | ||
|name=token.getId | |name=token.getId | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the maptool ID of the token. | Returns the maptool ID of the token. | ||
Line 77: | Line 77: | ||
|name=token.getProperty | |name=token.getProperty | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the value of the token property. | Returns the value of the token property. | ||
Line 89: | Line 89: | ||
|name=token.setProperty | |name=token.setProperty | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Sets the value of the token property. | Sets the value of the token property. | ||
Line 101: | Line 101: | ||
|name=token.getX | |name=token.getX | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the X position of the token. | Returns the X position of the token. | ||
Line 114: | Line 114: | ||
|name=token.getY | |name=token.getY | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Returns the Y position of the token. | Returns the Y position of the token. | ||
Line 126: | Line 126: | ||
|name=token.setX | |name=token.setX | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Sets the X position of the token. | Sets the X position of the token. | ||
Line 138: | Line 138: | ||
|name=token.setY | |name=token.setY | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.10.0 | ||
|description= | |description= | ||
Sets the Y position of the token. | Sets the Y position of the token. |
Revision as of 20:37, 22 September 2021
This article describes a feature or macro function that is experimental and may be subject to change.
Within the javascript environment used by js.eval
, Tokens are represented by the Token
class. The token class cannot be directly instantiated, but tokens can be found from the MapTool
top level name.
token.getNotes() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getNotes();
token.setNotes() Function
Note: This function can only be used in a Trusted Macro
Usage
token.setNotes(newNotes);
token.getName() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getName();
token.setName() Function
Note: This function can only be used in a Trusted Macro
Usage
token.setName(newName);
token.hasSight() Function
Note: This function can only be used in a Trusted Macro
Usage
token.hasSight();
token.getId() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getId();
token.getProperty() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getProperty(property);
token.setProperty() Function
Note: This function can only be used in a Trusted Macro
Usage
token.setProperty(property, newValue);
token.getX() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getX();
token.getY() Function
Note: This function can only be used in a Trusted Macro
Usage
token.getY();
token.setX() Function
Note: This function can only be used in a Trusted Macro
Usage
token.setX(newX);
token.setY() Function
Note: This function can only be used in a Trusted Macro
Usage
token.setY(newY);