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

Door opening

Hey all, I am very sure there are many topics covering this but I am looking for some pointers on open/close door scripts as I cant get anything to work.  Its not made easy that I cant actually understand some of the guide I am reading due to being fairly new to roll20 and not having a scripting background in any way whatsoever!  I don't want anything fancy, just to be able to open/close individual doors and preferably the light path too? Anyone offer any help? Ty
1492557527
The Aaron
Pro
API Scripter
Can you link the instructions you're following? Maybe we can clairify them for you?
Hey The Aaron, I have had a go with the two below, the first one has far more in it than i need (just want to beable to quickly swop the open and close door tile and the dynamic lighting path).&nbsp; I was falling down at the first hurdle really since I was not sure where to put the script and the tiles?&nbsp; I added the script as a new Macros in the right hand bar and then put the open and close doors on the token layer.&nbsp; I tried to link them but nothing appeared to happen with I called the command.&nbsp; It also makes reference to a command icon, which i took to just mean 'any icon' that i would use for controlling the door? <a href="https://app.roll20.net/forum/post/636123/script-do" rel="nofollow">https://app.roll20.net/forum/post/636123/script-do</a>... <a href="https://gist.github.com/goblinHordes/6894547" rel="nofollow">https://gist.github.com/goblinHordes/6894547</a> Thanks Ty
1492600402
The Aaron
Pro
API Scripter
No problem. &nbsp;Installing API scripts happens on the Game Management page. &nbsp;In the Settings menu, there is an entry for API Scripts. See:&nbsp; <a href="https://wiki.roll20.net/Game_Management#API_Script" rel="nofollow">https://wiki.roll20.net/Game_Management#API_Script</a>.. Of those two, I've not used the CommandDoors one. &nbsp;Matt's Door Script is by far the most popular on the forum. &nbsp;I've made a few minor tweaks to it to make it a bit more robust, but I've not actually set it up. &nbsp; 1) To create your Door token, it uses a Rollable Table Token. &nbsp;To to the Collections tab on the side bar in game and go down to the bottom and create a Rollable Table (call it something like Doors). &nbsp;Add 2 items to it, one for the door when closed and another for when it's open. (you can add as many doors as you like here, and choose them later). &nbsp;When you have your images in there, click the Token button next to the Rollable Table listing to create a Rollable Table Token. &nbsp;The token must be named "Door" initially. See: <a href="https://wiki.roll20.net/Collections#Creating_a_Rol" rel="nofollow">https://wiki.roll20.net/Collections#Creating_a_Rol</a>... 2) Create the Switch token. &nbsp;This can be any token you want. &nbsp;It will be visible to the players and used by them and you to manipulate the door. &nbsp;It must be named 'Switch'. &nbsp;Double click the token to bring up the token properties. &nbsp;The bars are used for various things, but at a minimum, you need bar 3 to be 0 / 1 . &nbsp;0 is the index of the closed door in the Rollable Table Token, 1 is the index of the open door. (feel free to swap those if you put the open door first) &nbsp;The index number starts at 0 and counts up. 3) Draw a line on top of the door token where you want the dynamic lighting drawn. 4) Link them by selecting all 3 and running !DoorLink &nbsp;(type it in the chat) Now you should be able to select the switch and run: !DoorOpen !DoorClose to manipulate the door. Hope that helps! &nbsp;Read through his post a few times after reading the above and make sure I didn't miss anything.&nbsp;
You my friend are a gentleman!&nbsp; Thank makes more sense and I have mostly managed to get it working.&nbsp; Its not currently swapping the door tiles, it moves the dynamic lighting layer and allows tolkens to see past, but the graphic remains as a closed door. Thanks you again! :) Ty
1492637183
The Aaron
Pro
API Scripter
Oh! &nbsp;You have to use images that are in a user library. &nbsp;If you drag them out of the Marketplace, it won't be able to switch them.
yeah, i have them in their, i uploaded them myself? I can flip manually but just not getting it to do it on its own?
1492637773
The Aaron
Pro
API Scripter
If you wanna PM me an invite and GM me, I'll take a look at it for you. =D
Thank you Aaron, you have been most helpful indeed, much kudos and gratitude to you! :D
1492712719
The Aaron
Pro
API Scripter
No worries! &nbsp;Happy Rolling!