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

Does the "One-Way Dynamic Lighting" still work?

1646112552

Edited 1646112718
newer to all the API and macro stuff and dnd on roll20 as well, just started a campaign 2 weeks ago and we've had them weekly on Sundays, never had to deal with height because most of it was just forest and cave fights, but now that I want to add cliff fights (And I put 10 bucks into a pro subscription)  so id like to do some 1-way vision rock climbing things and let my players be like (I just climbed a mountain look at my friends down there lol) so ive a been trying to make OWDL work but I'm probably just not using it right. also I looked at the gif and I'm kinda dumb so I'm not sure if I did it right and I tried it to the exact T so some help would be very much appreciated
The One-Way Dynamic Lighting script doesn't create true one-way dynamic lighting, because unfortunately it isn't really possible right now.  All it does is move dynamic lighting lines to the GM layer when a token is in a specific area.  So when a token moves into that area, the lines are removed from the DL layer, and everyone  can see through where the lines were. If you want to simulate one-way dynamic lighting, another approach is to use a transparent .png token with vision enabled that the player controls, and when a player moves into an area that should be able to see 'more', place the transparent token on the other side  of the DL lines. There is likely a way to automate that with a script, but I don't know of any that would do that already.  The 'It's a Trap' and 'Spawn' scripts can both make tokens appear, but they wouldn't automatically be controlled by the player moving their token into that area or be given vision abilities.
Jarren said: The One-Way Dynamic Lighting script doesn't create true one-way dynamic lighting, because unfortunately it isn't really possible right now.  All it does is move dynamic lighting lines to the GM layer when a token is in a specific area.  So when a token moves into that area, the lines are removed from the DL layer, and everyone  can see through where the lines were. If you want to simulate one-way dynamic lighting, another approach is to use a transparent .png token with vision enabled that the player controls, and when a player moves into an area that should be able to see 'more', place the transparent token on the other side  of the DL lines. There is likely a way to automate that with a script, but I don't know of any that would do that already.  The 'It's a Trap' and 'Spawn' scripts can both make tokens appear, but they wouldn't automatically be controlled by the player moving their token into that area or be given vision abilities. oh, I understand that it's not automated I just needed to know how to properly use it as I'm sure I'm messing it up somehow because I keep getting a long error msg in the console, of course, I might be miss understanding what your trying to tell me so please feel free to correct me.
1646116463
The Aaron
Roll20 Production Team
API Scripter
Can you post the error you're getting?  Are you installing the script in the API Scripts tab, not pasting it in the chat or elsewhere?
1646117812

Edited 1646119111
The Aaron said: Can you post the error you're getting?  Are you installing the script in the API Scripts tab, not pasting it in the chat or elsewhere? "OneWayDynamicLighting: MatrixMath is not defined" "ReferenceError: MatrixMath is not defined     at tupleToPoint (apiscript.js:2783:19)     at apiscript.js:2646:24     at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1330:9)     at toSegments (apiscript.js:2621:11)     at new Polygon (apiscript.js:1673:28)     at createWall (apiscript.js:1256:16)     at apiscript.js:1413:11     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1736:12" i got it from the github
1646136458

Edited 1646137813
David M.
Pro
API Scripter
Jarren said: ......The 'It's a Trap' and 'Spawn' scripts can both make tokens appear, but they wouldn't automatically be controlled by the player moving their token into that area or be given vision abilities. FYI note that the Spawn script can set the controlledby property of the character sheet represented by the token spawned. You would set up the default token to have vision. --controlledby| <optional +> <comma-delimited list of playerIDs or displayNames>   e.g.  --controlledby|David M.                          //replaces the controlledby property of the sheet with player David M. --controlledby|+David M., Bubba            //adds these two players to the controlledby property of the sheet
I use this script probably a lil different than intended, I call this script Vantage point API and anything in a battlemap that the players might be considered to climb up or onto, I use this script on.