getLights: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
To get a [[Macros:string list|string list]] of the [LightSource:light source|]]s that the current [[Token:token|token]] has on with the [[LightSource:type| lighet source type|]] of "Generic". | To get a [[Macros:string list|string list]] of the [LightSource:light source|]]s that the current [[Token:token|token]] has on with the [[LightSource:type| lighet source type|]] of "Generic". | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[ | [getLights("Generic")] | ||
</source> | </source> |
Revision as of 14:24, 13 December 2008
Function getLights
Returns a string list containing the names of the light sources that are on for the Current Token.
Usage
[h: lights = getLights()]
[h: lights = getLights(type)]
[h: lights = getLights(type, delim)]
[h: lights = getLights("*", delim)]
Where
- type is the type of light source (e.g. "Generic" or "D20"). If it is not specified then all light sources that are on for the token are returned.
- delim is the delimiter used to separate values in the string list. If it is not specified then it defaults to ","
If you want to specify the delimiter but still want to fetch all of the light source types then you can use the special value "*" for type.
Examples
To get a string list of all of the [LightSource:light source|]]s that the current token has on.
[getLights()]
To get a string list of the [LightSource:light source|]]s that the current token has on with the lighet source type| of "Generic".
[getLights("Generic")]