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

[Script: Door Knocker] Designating one door if two are within range

Is there a way to have the script open one door if two are the same distance away? For example, if a token is in the middle of a narrow hallway lined with doors, can the script open a door on the left side of the hallway while leaving the right side door closed?

Edited 1623556293
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Currently it'll choose the oldest door out of the options. May be some iffyness with how reliable that is, but that's the basic fallback just because of how the objects are grabbed. I've got some ideas on adding more specificity to door control, but they're just nascent ideas atm. I'd recommend using alt + move the token so it's slightly closer to one of the doors in the meantime.