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

Help With Personal Lighting Script

I'm trying to come up with an API script that changes perception settings for all of my characters at once. I'd like it to find 6 unique graphics by name (one for each character) and then change their light radius. Command A would change all of their light radius values to 100 simultaneously. Command B would change all of their light radius values to 0 simultaneously. I don't know how to use API but I think that this wouldn't be too hard to do. Can anyone write up a script that does this, please?
There is one already by Aaron B. Just search on this forum and you should find it.
I searched the forum and even looked at a list of his topics, but I didn't see it. Can you provide a link?
1410923248
The Aaron
Roll20 Production Team
API Scripter
I don't know about Aaron B, but I have a Torch Script you can use to do that. !torch 100 - yes <token_id> <token_id> <token_id> ... !snuff <token_id> <token_id> <token_id> ... You can get the token ids like: @{target|token_id} And that should about do it for you. If not, let me know and I'll see what I can't work out. =D
Sorry the B was a typo. Rubbish touch keyboards on my tablet :p
It looks good, but it doesn't seem to be working. Let's say I have tokens named Jericho and Jade. Would I type this? !torch 100 - yes Jade Jericho That's what I did and it didn't work. I even tried using the @{target|token_id} function, but even clicking the token didn't help. Can you tell me what I'm doing wrong?
1410965575
The Aaron
Roll20 Production Team
API Scripter
You need to get the token_id using @{targer|token_id}. That will print the is to the chat. It will look like -JDHKON157djk478fgjiigc156 or some such. That is what you add to the macro. If you want to PM me a join link, I can come show you?