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

Its a trap to switch map

Hello all Im trying to make a DnD map were the main mechanic is changing size (think Alice in wonderland ish) Now I have made multiple maps that I placed in the map layer and can manual change by using the "to front" and "to back" option to introduce this effect. Now I'm trying to let it happen by using api commands. So the idea is that I make a "Its a trap" object that will bring the map up that is currently needed. but I cant seem to find a API that will do that for me. 
1624899063
The Aaron
Roll20 Production Team
API Scripter
If this is zone based you could use one of the Teleport or Page Navigator scripts.
Its not realy someting Im looking for. cuz the teleportation and page navigator scripts will make it look more clunky than if I just Layer maps and use the to front and back option manualy
1624902416

Edited 1624902472
The Aaron
Roll20 Production Team
API Scripter
Oh!  Sorry, I totally missed the to front/to back stuff. You can have It's a Trap call TokenMod and have it move the map to the front. !token-mod --order f --ids -ASad2345asdf The main problem is having it call the right token id.  You could set up a large Rollable Table Token and just have it advance the side: !token-mod --set currentside|+1 --ids -ASad2345asdf It will wrap to the first image when it goes of the end.  Note that this only works with User Library Graphics, so you'll need to pull anything from the Marketplace that you are using and upload it to your own library. (Limitation of the API)
1624906072

Edited 1624906136
Wow that works amazing. kinda confused what the ASAD2345asdf is for but hey it works :) edit ow nv. its a Placeholder ID
1624909752
The Aaron
Roll20 Production Team
API Scripter
yup yup, sorry about that, meant to mention that.  If want an easier way to deal with it, you can create a character called something like Map, and have that graphic represent the Map character, then use: !token-mod --set currentside|+1 --ids @{Map|character_id} --current-page Another benefit is that it will work for any page, though there might be an issue with it working from the It's a Trap call. (since it calls as the API, not a real player).  If that's the case, you'd need a Map Character specific to each page. and you'd drop the --current-page