getLights: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function getLights== {{ProposedChange}} Returns a Macros:string list containing the names of the Map:light sources that are on for the current Token:token. ===Usage=== <s...)
 
No edit summary
Line 12: Line 12:
Where  
Where  
* type is the [[LightSource:type |type of light source]] (e.g. "Generic" or "D20"). If it is not specified then all [[LightSource:light source|light source]]s that are on for the [[Token:token|token]] are returned.
* type is the [[LightSource:type |type of light source]] (e.g. "Generic" or "D20"). If it is not specified then all [[LightSource:light source|light source]]s that are on for the [[Token:token|token]] are returned.
* delim is the delimiter used to separate values in the [[Macros:string list|string list]].
* delim is the delimiter used to separate values in the [[Macros:string list|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 [[LightSource:type | light source type]]s then you can use the special value "*" for type.
If you want to specify the delimiter but still want to fetch all of the [[LightSource:type | light source type]]s then you can use the special value "*" for type.

Revision as of 22:14, 1 December 2008

Function getLights

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

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".

[getLibProperty("Generic")]