setGMName: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Added id parameter.) |
Verisimilar (talk | contribs) (Completed the article.) |
||
Line 2: | Line 2: | ||
|name=setGMName | |name=setGMName | ||
|trusted=true | |trusted=true | ||
|version=1.3b49 | |||
|description= | |description= | ||
Sets the | Sets the GM Name of a token. | ||
|usage= | |usage= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
setGMName(name) | setGMName(name) | ||
</source> | |||
<source lang="mtmacro" line> | |||
setGMName(name, id) | setGMName(name, id) | ||
</source> | </source> | ||
'''Parameters''' | |||
{{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]].}} | |||
|examples= | |||
Sets the GM Name of the [[Current Token]] to {{code|New GM Name}}. | |||
<source lang="mtmacro" line> | |||
[h: setGMName("New GM Name")] | |||
</source> | |||
Sets the GM Name of all selected tokens to {{code|New GM Name}}. | |||
<source lang="mtmacro" line> | |||
[h: SelectedTokens = getSelected()] | |||
[h,foreach(TokenID, SelectedTokens), code: | |||
{ | |||
[h: setGMName("New GM Name", TokenID)] | |||
}] | |||
</source> | |||
|also= | |||
{{func|getGMName}} | |||
|changes= | |changes= |
Revision as of 06:15, 4 June 2009
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)
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.
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.