createToken: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page createToken to CreateToken without leaving a redirect: Converting page title to first-letter uppercase) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{MacroFunction | {{MacroFunction | ||
|name=createToken | |name=createToken | ||
|trusted=false | |trusted=false | ||
|version=1.11.0 | |version=1.11.0 |
Latest revision as of 23:59, 11 December 2023
createToken() Function
• Introduced in version 1.11.0
Creates a token from the information in the required JSON object parameter. The JSON object must have
name
and tokenImage
key/value pairs.Usage
createToken(param1)
Parameters
param1
- A JSON object as described for theupdates
parameter of copyToken().
Example
Create a token using an existing token image with random X/Y location.
[h: val = json.set("{}", "tokenImage", getImage("Hero"), "name", "test1","x",1d10,"y",1d10)]
[h: id = createToken(val)]
Returns:
The ID of the created token.See Also
Version Changes
- 1.11.0 - First released.