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

Great yet another fancy "Open Door" script....

1428172393
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Great yet another fancy "Open Door" script.... ...just what we DON'T need. Why not "open chest?" Token actions: [Check] [Pick] [Open] Graphic changes.... and creates a hand out with item lists.
1428210601
vÍnce
Pro
Sheet Author
Or, failure to notice the trap that protects the chest... Graphic changes and the player suffers the consequences.
1428229756
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: Or, failure to notice the trap that protects the chest... Graphic changes and the player suffers the consequences. Yeap! So what would all be needed to work with a wide number of objects? [ { itemName: 'Chest', itemState: 'open,closed,broken,sprung', itemstatusURl: 'http...open.png,http...closed.png,http...broken.png,http...sprung.png', itemStatus: 'closed'} ]
1428242681
vÍnce
Pro
Sheet Author
I like it. Very useful. So what's the hold up? lol I expect this is going to make it's way into your next marketplace item/script... "GM's Tools of the Trade"
Actually a Usable Open Door Script that plays nice with other scripts would be nice.. Matt's Door Control Script could be used to open a chest, BTW...
1428245418
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Every door script has a door token that is on a square on the map. So we create an array in state that represents the map: [ { at: [10,20], //map square x,y itemName: 'Chest', itemState: 'open,closed,broken,sprung', itemStatus: 'closed', request: 'open'} ] Any script just has to listen for a request and maintains parity between the status and request. No all scripts can interact indirectly with any item on the map that is stores in state.
just so you all know, this is one of the things Rand is working on, as an extension of the room management script. Once doors and walls are coded and set properly, and he's finished experimenting with a few things, it should (read should, not will) happen in fairly quick order, as all the neccessary functions will already be coded in. there are still a few things to add to the doors first, which when finished will also translate to other objects that his script will be able to handle. Locked already works, and trapped I think is next, though at this moment its more about streamlining the menus and attempting to produce less chatter to interfere with the chat.
1428332517
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I think the point of this thread is relating in game objects/items to the map by recording them in state. Any script can say anything is "here" on the map and here is how you let the script know you want to interact with it.
1428374744
vÍnce
Pro
Sheet Author
Stephen is a master at seeing alternatives to the obvious. Dropped on his head as a wee lad I say...