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

[Request] Door opener for player use

I'd like to see a door opening script where a player can click on the door token to open it.  Or even as the GM I can 1 click to open (including the DL) a door for the players.  I don't have enough scripting experience to make one, but I can throw out some suggestions for how it might work. For example: Have the doors as tokens on a table and when the player clicks it flips to the open token.  I'm not sure if the DL can be controlled this way though.  Another option is the rotation script, possibly with larger tokens where the door only occupies half the token (so spinning on the center makes the door appear to rotate). If anyone has tried these options or knows of a link to one that is already done (I didn't see anything on the API list) I'd appreciate it.  Alternate suggestions are also welcome.  Thanks in advance.
1461866332
The Aaron
Pro
API Scripter
Matt's Door script does this.  The interface takes a bit of setting up but afterwards, it's very nice.  He's working on a total rewrite currently which promises to be even better. =D
1461868959
Ziechael
Forum Champion
Sheet Author
API Scripter
Seconded, I've used this script for a long time and I love it. It also allows for traps, locks, hidden doors and other goodies that make it a lot of fun. I also use it for interactive chests, portcullis', drawbridges... hell just about anything that can be open or closed :)
Thanks.  I didn't see that one in the script list.
OK, I don't understand how to set up the links in this script.  I'm guessing the "wall path" is the dynamic lighting wall for the door.  I have a switch and a door table.  I just can't figure out how to use the !DoorsLink to attach them together.  I simply get a response that tells me to choose the items.  Reading through 600+ lines of code to find the commands doesn't appeal to me, so any simple instructions would be helpful. I hope when the author rewrites this, he (or she) adds a readme with some guidance.   The rest seems pretty straightforward and easy though.  I'm sure once I get this working I'll be praising his hard work.
1462032451

Edited 1462032567
Ziechael
Forum Champion
Sheet Author
API Scripter
The 'wall path' is a line drawn where you want the door to block sight when it is closed so you need to make sure your walls have holes in them where you are going to put doors. For things other than doors that don't block sight but that you want to use the open/close function for (chests etc) you can place the line somewhere out of the way and still select it as part of the grouping :) You need to place them all on the same layer and select them all at the same time, i tend to use the objects layer by default since that is where i am doing my set dressing. Make sure each thing is where you want it (door in the door frame, drawn line along the centre of the door and the switch wherever you want it) then select them all, either with shift-click or by dragging a box around them all (i also send the door to the back to ensure that i get the smaller objects). Then run !DoorsLink exactly as you have been doing and it should confirm it in the chat for you, the DL line will move to the DL layer (if the door is closed) and the door will move to the map layer with the switch still on the objects layer for players/DM to use. Sometimes the door moves to the back of the map layer so you might need to send your map to the back to show the door lol.
Thanks for the reply.  Unfortunately I still can't seem to get it to work.  I tried using the token from a rollable table for the door, I tried using the door token (named door, it's a png image).  The switch is named Switch.  I tried shift+click, I tried dragging a box around them.  I tried with the switch token pre-set and I tried with the fields blank.  I haven't tried to use a sheet for it yet.  My wall line was lifted right out of the Lighting layer.  Nothing seems to work for it.  The only other script I'm using that might interfere is 'It's a Trap' or one of it's sub-scripts. Other than that I simply changed the skill names required for detecting and removing traps to Perception and Sleight of Hand (I'm using Pathfinder) but I don't see how that would change the link ability. It's probably some eyedee-ten-tee error on my part and when someone points it out, I'm going to /headdesk.  Anyway, thanks again for the help.
What problem do you have Feadel? Can't you create the linked door?
Using the !DoorsLink command simply returns the message that I need to select a door graphic, switch graphic and wall.  It does not form the link at all.  I've tried various settings on the tokens, tokens from a table and non-table tokens.  I've used shift+click to select and box dragged.  Every time the same message returns and nothing changes about the tokens and no link is made. I've read through the script, I named it Doors (so it appears as Doors.json in my API list.)  I can''t find anything I could have changed or any specific select module.  There is a section for checking that one of each item is selected, but nothing to specify selection. I select the items (1 door token from a table, 1 switch token, one poly-line to be the wall) and type the !DoorsLink command.  I get the message that I need to select 1 of each item.  I'm thinking as I type this that maybe the 'wall' has to be a shape or free-hand line?  The poly line might not register right.  That will be my next test. Anyway. I hope some one can shed some light for me.  Thanks again all.
Ok, I seem to have found the link problem, but now I have the problem of using a table to show the open vs closed state.   I had to use a non-table token (re-named door.)  The table token is not registering as a token named 'Door'.
Also I can't seem to edit the switch token after linking it.  So I need to know how to use a table token and how to get the switch to be editable after making the link.  It's useable for me now, but not to the full range of its intended use.
This is a wonderful script, which crashes constantly now. I think since the "one click" API has been in effect it is almost always crashing. Same with Matt's Music control script, dead as a doornail...