Register

LightSwitch

An Add-on Module for Foundry Virtual Tabletop

Author: slate Project Source: Project URL Versions 0.7.6+ (Verified 0.7.9) Last Updated 2 years, 11 months ago

LightSwitch

This module allows players to trigger a macro that turns on and off lights (through the GM).  (Not updated for 0.8.x yet...)

How to use

NOTE: A GM and player are required for this module to work.
  1. Open up any light configuration panel and set the name of the light. (Multiple lights can share a name and be triggered as a group.) When you're done, click Update Light Source.
  2. Toggle the light(s) on or off in any combination by right clicking a light.
  3. Create a macro with the type script, with the following contents, replacing lightgroup1 with the name of your light(s): game.LightSwitch.flipTheSwitch("lightgroup1")
  4. Use whatever module you wish to trigger the macro. This macro MUST be triggered by a user, not a GM, otherwise it will not work. (see below for a GM macro command) I recommend the module Trigger Happy
  5. Repeat the process for any other lights

If you wish to trigger macros as a GM, you can use the following macro command instead: game.LightSwitch.flipTheSwitchGM("lightgroup1")

 

When the macro is triggered, all lights matching the name you set in the macro will be toggled. If there are multiple lights, this could mean that some switch on, while others switch off.

Categories

Available Versions

  1. Version 1.1.3

    2 years, 11 months ago
    Foundry Version 0.7.6+ (Verified 0.7.9) Manifest URL Read Notes
  2. Version 1.1.2

    Foundry Version 0.7.6+ (Verified 0.7.9) Manifest URL Read Notes
  3. Version 1.1.1

    Foundry Version 0.7.6+ (Verified 0.7.9) Manifest URL Read Notes
  4. Version 1.1.0

    Foundry Version 0.7.6+ (Verified 0.7.9) Manifest URL Read Notes
  5. Version 1.0.0

    Foundry Version 0.7.6+ (Verified 0.7.9) Manifest URL Read Notes