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

How to detect the parameters of the different cells ? (and use them in an API script)

Hello everyone, thank you for taking the time to read my question, I wonder how can I get the parameters of the differents cells composing the map and especially the ones saying "brightlight" here "lowlight" here and 'nolight" there. I'd like to use these information to create a token marker applier that would check the shadow/light of a specific area (cell of the map) and apply a marker on a token depending on how enlightned he is. In my fallout game it's harder to fire in the darkness than in bright light... Thank's a lot for your help ! 
1723123540
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Victor! I wrote this very script a couple of weeks ago. If it is not exactly to your needs, it should be close enough to get you started. It uses the output of another script, CheckLightLevel, which does the hard part, and puts a brightness marker into the name plate of tokens you want to track. [Scriptlet] Light Meter
Hello Keithcurtis, Thanks a lot !
This did almost exactly what I wanted I just had to change a little thing but thanks a lot again !
(I don't use the names written below the token so the marker is a better choice for me :) )
1723129971
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yeah, I waffled over that, but I didn't want to write a whole interface for users to choose a custom token marker. Glad it works for you!