setLight

From RPTools Wiki
Revision as of 22:20, 9 February 2023 by Conversion script (talk | contribs) (Conversion script moved page setLight to SetLight without leaving a redirect: Converting page title to first-letter uppercase)
Jump to navigation Jump to search

setLight() Function

Introduced in version 1.3b48
Sets the light sources of the Current Token. If the value is false(0) then the light source is turned off; otherwise, it is turned on.

Usage

setLight(type, name, value)
setLight(type, name, value, id)
setLight(type, name, value, id, mapname)

Parameters

  • type - The light source type, (e.g. "Generic", "D20").
  • name - The name of the light source.
  • value - If true(1) sets the light on, if false(0) turns it off.
  • id - The token id of the token to change the light sources, defaults to the Current Token.

     Note: This parameter can only be used in a Trusted Macro

  • mapname - The name of the map to find the token. Defaults to the current map.

Example

[h: setLight("D20", "Candle - 5", 1)]


Version Changes

  • 1.5.4 - Added id and mapname parameter options.