getTokenStates

From RPTools Wiki
Revision as of 22:42, 26 April 2009 by Cclouser (talk | contribs)
Jump to navigation Jump to search

getTokenStates() Function

Introduced in version 1.3b51
Returns the valid states in the campaign settings in either a String List or JSON Array.

Usage

getTokenStates()
getTokenStates(delim)
getTokenStates(delim, groupName)

Parameter

  • delim - Specifies the delimiter used in the string list that is returned, defaultis ",". If the value is set to json, the function returns a JSON array instead.
  • groupName - Specifies the name of the group to get the states for. Note that if you wish to use the groupname parameter, you MUST set a delimiter.

Example

To get a String List of the valid Token States in the campaign.
[h: states = getTokenStates()]

To get a JSON Array of the valid Token States in the campaign.

[h: states = getTokenStates("json")]

To get a JSON Array of the valid Token States in the Damage group in the campaign in 1.3b55 or later.

[h: states = getTokenStates("json", "Damage")]


Version Changes

  • 1.3b55 - Added the groupName parameter.