getAllPropertyNames
getAllPropertyNames() Function
- If the delimiter is not specified then a string list is returned and the default value of
","
is used. - If the delimiter is
"json"
then a JSON Array is returned. - Otherwise, a string list is returned using the delimiter passed in.
Usage
<syntaxhighlight lang="mtmacro"> getAllPropertyNames() getAllPropertyNames(type) getAllPropertyNames(type, delim) </source> Parameters
type
- The name of the property set to be retrieved. Defaults to all defined token property sets. Use"*"
or""
when using a delimiter to get all sets.delim
- The delimiter to be used in the list of names returned. Default is,
If type is specified then the string list contains the property names for that token property type, otherwise it will contain the token property names for all token property types. If delim is specified then it is used to separate the values in the string list, if it is not specified then it defaults to ','.
Examples
<syntaxhighlight lang="mtmacro" line>
Campaign Properties
[h: props = getAllPropertyNames()]
[foreach(name, props, "
"): name]
</source>
If you have two token property sets, for instance "PC" and "NPC", you could print out all of the properties for the "PC" property set like so:
<syntaxhighlight lang="mtmacro" line>
PC Properties
[h: props=getAllPropertyNames("PC")]
[foreach(name, props, "
"): name]
</source>
Get the Basic properties in a JSON Array: <syntaxhighlight lang="mtmacro" line> [r: props=getAllPropertyNames("Basic","json")]
</source>Version Changes
- 1.3b49 - Added
json
delimiter option.