setSize: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|version=1.3b48 | |version=1.3b48 | ||
|description= | |description= | ||
Sets the size of a [[Token]] with one of the defined sizes according to each Grid Type. The sizes can be found on the [[Token Size]] page. "Free" or "Native" are also valid values. | Sets the size of a [[Token]] with one of the defined sizes according to each Grid Type. {{Note|The names of each size are based on the type of grid the map uses. The sizes can be found on the [[Token Size]] page.}} "Free" or "Native" are also valid values. | ||
|usage= | |usage= | ||
Line 10: | Line 10: | ||
setSize(size) | setSize(size) | ||
setSize(size, id) | setSize(size, id) | ||
setSize(size, id, | setSize(size, id, mapRef) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|size|A [[Token Size]] to set the token to. Can be "Free" or "Native" as well.}} | {{param|size|A [[Token Size]] to set the token to. Can be "Free" or "Native" as well.}} | ||
{{param|id|The token {{code|id}} of the token which will have its [[Token Size]] set. Defaults to the [[Current Token]].}} | {{param|id|The token {{code|id}} of the token which will have its [[Token Size]] set. Defaults to the [[Current Token]].}} | ||
{{param| | {{param|mapRef|The Name or ID of the map to find the token. Defaults to the current map.}} | ||
The sizes available on the for Square grid maps are: | |||
* {{code|Fine}} | |||
* {{code|Diminutive}} | |||
* {{code|Tiny}} | |||
* {{code|Small}} | |||
* {{code|Medium}} | |||
* {{code|Large}} | |||
* {{code|Huge}} | |||
* {{code|Gargantuan}} | |||
* {{code|Colossal}} | |||
| |||
|examples= | |examples= | ||
Line 30: | Line 42: | ||
|also= | |also= | ||
{{func|getSize}} | {{func|getSize}} [[resetSize|resetSize()]] | ||
|changes= | |changes= |
Latest revision as of 23:59, 16 April 2024
setSize() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b48
Sets the size of a Token with one of the defined sizes according to each Grid Type.
The names of each size are based on the type of grid the map uses. The sizes can be found on the Token Size page.
"Free" or "Native" are also valid values.Usage
setSize(size)
setSize(size, id)
setSize(size, id, mapRef)
Parameters
size
- A Token Size to set the token to. Can be "Free" or "Native" as well.id
- The tokenid
of the token which will have its Token Size set. Defaults to the Current Token.mapRef
- The Name or ID of the map to find the token. Defaults to the current map.
The sizes available on the for Square grid maps are:
Fine
Diminutive
Tiny
Small
Medium
Large
Huge
Gargantuan
Colossal
Examples
To set the size of the current token to
Medium
:
[h: setSize("Medium")]
To set the size of the current token to whatever string is stored in the macro variable mySize:
[h: mySize = "Large"]
[h: setSize(mySize)]
See Also
Version Changes
- 1.3b51 - Added
id
parameter option. - 1.5.4 - Added
mapname
parameter option.