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] Room management - dynamic lighting and doors that can be toggled

Is there a way to have !api-room re-execute after you click on a context sensitive button? i.e. "refresh" after making a change?
just run the command again to bring up the updated menu - this is because of the way chat is. although I'm thinking of asking Rand to work out an interface using a handout and the button trick instead of having to print and reprint into chat all the time.... not sure it will work, but i'm hoping it will, based on what i've seen elsewhere on Roll20.
Thanks. Great work on this, by the way!
not my work :) I just pester the guy to come up with even more awesome things to use his script for - Rands' the one who rises to the challenge
Yeah - automatically having !api-room execute after you've done a command that would change an object is doable. I'll add it to the list. I'm in the middle of a complete rewrite to make this script easier to manage, but I can get to stuff like that after.
Version 3.0 is available. The main changes are: This uses a new script that I wrote called VisualAlert ( <a href="https://github.com/RandallDavis/roll20-visualAlert" rel="nofollow">https://github.com/RandallDavis/roll20-visualAlert</a>... ). When a door is toggled, an animation appears over the door so that everyone knows what happened. Doors can now be locked (click on the door and run !api-room ). Locked doors do not open or close when interacted with, but they have a visual alert so that everyone knows why the door isn't budging. A help button is available in every !api-room command. You can now make !api-room a 'token action' instead of a macro that you keep on your macro bar. Room doors are created faster. Some bug fixes. Complete restructuring of the codebase to make it easier to manage going forward (probably nobody but me cares about this).
1428252775

Edited 1428254051
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You got a GIF of the VisualAlert? Want to see how it turned out :)
Yeah - I ended up going with these... ( Michael H. ) and I found a couple starter pics that I traced over to get consistent styling: indicates that a door was closed indicates that a door was opened indicates that a door is locked I'll probably make a thread for VisualAlert when I get bored, but it's pretty easy to wire up and use... let me know what you think. :)
Might be a stupid question but I'm at my wits end, I made the macro !api-room and typed it in and it isn't doing anything... What am I missing? I have the visual alert script in and set the door image urls. Any ideas?
Oops - my bad... I left a default setting in for what I needed for debugging last night. Check out your handouts - you should have one called API-RoomManagement . That's probably where all of the text is going instead of in the chat window. There's a setting to switch it between chat and handout mode.
If you pull the latest code, it'll set it to chat as well.
Ah ok, good to go, thanks!
The latest version has better UI features. This incorporates requests from Michael H. and Ron , along with some other polish. You can now interact with the UI via the chat text or in a handout. This is controlled via the "UI Preference" setting. If you go with handout mode, a handout is automatically created. It has the exact same text that you'd see in the chat window. The main difference is that it refreshes the handout with new text, while the chat window adds more and more text as you interact with the script. This does not work while popped out (sadly). If you change an object, the UI automatically refreshes with new options. Where refreshing isn't possible, you will receive a notification so that you know that your action was successful (or unsuccessful). This notification comes along with handy links to let you navigate the UI from there. Also, the UI options have been improved a bit, so that things are easier to click though.
You can now put traps on doors. There are two kinds: those that are set off when they're toggled (which aren't set off if the door is locked and toggling is impossible), and those that are set off when the door is interacted with at all.