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

[Script] On-Way dynamic lighting issue

Hi all, I'm trying to figure out how to use the one-way dynamic lighting script in order to cordon off areas that i do not want my players being able to see through due to height differences. I have followed the instructions on the page (multiple times) and cannot seem to get it to work with Updated dynamic lighting nor the legacy dynamic lighting. The filled in polygon disappears and no errors are displayed as far as i can tell. However, when i drag a token around and place it in different locations nothing appears to have change. All of the tokens in both scenarios are representing a character as instructed per this thread I am relatively new to using Roll20 with scripts so i could be doing this wrong however i am pretty sure I have set everything up correctly.
Any script that deals with Dynamic Lighting will likely not be written with Updated Dynamic Lighting (UDL) in mind. UDL might not even be exposed to the API yet. Also, keep in mind that UDL is in beta test, and is not recommended for live games. For active games you should stick to the Legacy Dynamic Lighting, and the script should work, to boot.
1589911678

Edited 1589914462
Ada L.
Marketplace Creator
Sheet Author
API Scripter
The script should be agnostic to whichever version of dynamic lighting you're using. It just deals with moving the lines for the dynamic lighting walls between the "gmlayer" layer and the "walls" layer, depending on whether a character token is inside the (now invisible) filled polygon's area. It doesn't touch any of the page's DL settings. Could you share some screenshots of how you're setting up your one-way dynamic lighting? Also, checking to be sure: Are those characters the tokens represent controlled by a non-GM player? That's another gotcha.
Ah. Don't listen to me. Pay attention to Stephen. :-)
1589974082
Andreas J.
Forum Champion
Sheet Author
Translator
Rabulias said: UDL might not even be exposed to the API yet. UDL does have some API support already , but as it's still a work-in-progress, so some API scripters are understandably hesitant to fully commit to add UDL support to them if they will later need to make bunch of changes if something in UDL changes.
Stephen L. said: [...] Also, checking to be sure: Are those characters the tokens represent controlled by a non-GM player? That's another gotcha. Oh thank you! that was it! I opened another tab and jumped in as a player and gave myself a token and it worked like a charm!
1590065709
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Baz said: Stephen L. said: [...] Also, checking to be sure: Are those characters the tokens represent controlled by a non-GM player? That's another gotcha. Oh thank you! that was it! I opened another tab and jumped in as a player and gave myself a token and it worked like a charm! Glad that solved the issue! It's designed that way so that NPC characters (including enemies) don't mess with the script.