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

Toggle door from chat

Hello, Is it possible to toggle a door from chatbox , instead of clicking on it ? I want use reaction to toggle hidden door to visible door when the PC walk nearby thanx  ascaric
1781893286
The Aaron
Roll20 Production Team
API Scripter
Not without the Mod API, a pro subscriber perk. 
ok, and with the    pro subscriber perk , how can i do it?
1781895216
The Aaron
Roll20 Production Team
API Scripter
You can use the script It's a Trap to detect when a player is in a region, then have it trigger another script to reveal the door.  I don't know of a specific script for that, but here's one I threw together: on('ready',()=>{ on('chat:message',msg=>{ if('api'===msg.type && /^!door-reveal(\b\s|$)/i.test(msg.content)){ msg.content.split(/\s+/) .slice(1) .map(id=>getObj('door',id)) .filter(o=>o) .forEach(door=>door.set({isSecret:false})) ; } }); }); Used like: !door-reveal <ID1> [ID2 ...] Like: !door-reveal -OvWDCZaywyhzeojcYVv -OvWDCTQzHZh_GbPWl0A -OvWDCLqOUDthRyU1GVf -OvWCUegnCGskmelYMmL or !door-reveal -OvWDCZaywyhzeojcYVv
1781914336
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Portal script can do it. But you would need to use selectManager to set the selection. I'd give more help, but I am travelling. Perhaps Timmaugh can help with the selection part..