RPTools

From MapToolDoc

setGMName

Contents

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

  1. setGMName(name)
  1. 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.

  1. [h: setGMName("New GM Name")]

Sets the GM Name of all selected tokens to New GM Name.

  1. [h: SelectedTokens = getSelected()]
  2. [h,foreach(TokenID, SelectedTokens), code:
  3. {
  4. [h: setGMName("New GM Name", TokenID)]
  5. }]

See Also

getGMName()

Version Changes

  • 1.3b51 - Added id parameter option.