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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
1. How could the below API be updated to only effect the light sources that can be seen by all? 2. How could the below API be updated to only effect only selected tokens? Thanks.
Well, it will only change the selected token, in the regard that you have to select it to make a change to it. If you only want it to affect tokens with other players see light checked, you can add to the if check: && obj.get('light_otherplayers') Note: players that control tokens with out that check set would not have their light sources affected.
Yes, players that control tokens with out that check set would not have their light sources affected, is what I wanted. ok i am going to make the changes and see what happens. Thanks! When is the Roll20 team going to hire you?
You wouldn't believe how often I hear that. :) I'd love to do that, but the simple unfortunate fact is they would need a bunch more supporters. :/. But I'll do what I can whilst still employed elsewhere! :)
Ok Aaron, I am trying to work my way up to script kitty status, I remember a bit of TRS-80 CoCo basic: line 10 Print "Hello World" line 20 goto line 10 something like that. I tried to add to the original script: <a href="https://gist.github.com/5489058.git" rel="nofollow">https://gist.github.com/5489058.git</a> && obj.get('light_otherplayers') but no joy.
I have tested it with other scripts disabled "if(obj.get("left") == prev["left"] && obj.get("top") == prev["top"] && !obj.get('light_otherplayers')) return;" Both unchecked tokens and checked tokens light radials are being reduced. I am looking for a way to have the light of a torch fade while letting tokens with low light sight not be effected.
@Aaron, <a href="https://gist.github.com/5489058.git" rel="nofollow">https://gist.github.com/5489058.git</a> changing line 5 to: if(!obj.get('light_otherplayers')) return; seems to work!! Thanks for your help! Jim