setGMName: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) (Completed the article.) |
No edit summary |
||
Line 9: | Line 9: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
setGMName(name) | setGMName(name) | ||
setGMName(name, id) | setGMName(name, id) | ||
setGMName(name, id, mapname) | |||
</source> | </source> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|name|A string that is set as the GM Name on the token.}} | {{param|name|A string that is set as the GM Name on the token.}} | ||
{{param|id|The token id of the token that has its GM Name set. Defaults to the [[Current Token]].}} | {{param|id|The token id of the token that has its GM Name set. Defaults to the [[Current Token]].}} | ||
{{param|mapname|The name of the map to find the token. Defaults to the current map.}} | |||
|examples= | |examples= | ||
Line 37: | Line 38: | ||
|changes= | |changes= | ||
{{change|1.3b51|Added {{code|id}} parameter option.}} | {{change|1.3b51|Added {{code|id}} parameter option.}} | ||
{{change|1.5.9|Added {{code|mapname}} parameter option.}} | |||
}} | }} | ||
[[Category:Token Function]] | [[Category:Token Function]] |
Revision as of 14:12, 16 December 2019
setGMName() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b49
Sets the GM Name of a token.
Usage
setGMName(name)
setGMName(name, id)
setGMName(name, id, mapname)
Parameters
name
- A string that is set as the GM Name on the token.id
- The token id of the token that has its GM Name set. Defaults to the Current Token.mapname
- The name of the map to find the token. Defaults to the current map.
Examples
Sets the GM Name of the Current Token to
New GM Name
.
[h: setGMName("New GM Name")]
Sets the GM Name of all selected tokens to New GM Name
.
[h: SelectedTokens = getSelected()]
[h,foreach(TokenID, SelectedTokens), code:
{
[h: setGMName("New GM Name", TokenID)]
}]
See Also
Version Changes
- 1.3b51 - Added
id
parameter option. - 1.5.9 - Added
mapname
parameter option.