Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

New to macros I need help with toggling on/off switches for dynamic lighting.

I am not sure if it is possible I have been searching for a solution for a few hours now and I can't find an answer. I am trying to set up a way for my players to turn on "wall mounted torches". For example they will be entering an abandon cabin and there is no light inside I want them to be able to walk up to a token or the light source and click a macro button to " Light The Torch' and to be able to extinguish it. If anyone has any helpful information it would be greatly appreciated.
1685596086
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Rurik Redminer! To automate anything on the VTT requires a mod script. Using scripts is a Pro subscriber level perk. If the creator of the game is a Pro subscriber then the scripts Token Mod or Dynamic Lighting Tool are good candidates for this purpose. If not, then turning on the lights requires a minimum of a Plus level subscription for use of the Dynamic Lighting feature. If you can use Mod scripts, then one of us can certainly help you set up the proper commands.
the creator is a pro member so I can use scripts I have the token mod but I can't get it to work
Rurik Redminer said: the creator is a pro member so I can use scripts I have the token mod but I can't get it to work You'll have to provide some more information about what specifically you're doing, and what the result is. Screenshots are usually helpful. E.g. If you are the GM, what command are you using? Are you using it while logged in as GM, or while using 'Rejoin as Player', or on a Dummy Account? Are you sure that TokenMod is installed in the game?
Sorry long day, I would like my players to be able to click on the light source circled in red     and be able to toggle it on or off with macros. I guess I would need to turn off these two light settings in the token's dynamic lighting settings or turn their values to zero
Thank you for the help I was able to stumble upon the information I needed thanks again and have a good night
1685673016

Edited 1685673059
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Do you have the text of the macro you are trying? If you want them to be able to select the light source, it will need to be on the token layer, and you will need to open the token settings and give control permission to "All players": If you want them to be able to toggle it without selecting it or even if it is on the DL layer, you will need to set your token mod macro to access it by the token id. You can pre-set the token setting to the light required and then toggle the light off. You can then turn it on with this macro if it is selectable: !token-mod --set emits_bright_light|on emits_low_light|on to turn it off, use: !token-mod --set emits_bright_light|off emits_low_light|off If you want to do it without selection, you'll need to use the token id. To get this, select the token and run this in chat: {@selected|token_id} This will return a 16 digit id preceded by a dash, ex: -1234567890abcdef The commands become !token-mod --ids -1234567890abcdef --set emits_bright_light|on emits_low_light|on and !token-mod --ids -1234567890abcdef --set emits_bright_light|off emits_low_light|off You will also need that token-mod is set to allow players to refer to tokens by id. This is off by default for security. The command to turn this on is: !token-mod --config players-can-ids|on.