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

Video Tutorial - Automatically Centering the Map at a Specified Location

March 13 (4 years ago)
Nick O.
Forum Champion

I created a video tutorial showing how to automatically center the map at a specified location whenever the player ribbon is moved to a new page. https://www.youtube.com/watch?v=AX7DAnY9p74

That is awesome... I already added it!  Thanks Nick!!!

March 13 (4 years ago)
Snow
Pro

Yes very nice Nick, I like your videos and scripts so far. Keep it up :)


March 13 (4 years ago)
Mike W.
Pro
Sheet Author

This is fantastic. Now if you could only set the Zoom level too.

March 13 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Great series. I particularly like how you purposefully run the script in an imperfect state to demonstrate problem solving. Great for reducing new coder frustration and stress.

March 13 (4 years ago)

Edited March 16 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

For those who use tokenmod, here is a command that will take any graphic and do all of the prep steps of making a PlayerStart token out of any graphic you place on the VTT:


!token-mod --set imgsrc|https://s3.amazonaws.com/files.d20.io/images/107570702/yWtrhUreBm5uBFATMDtgMQ/original.png name|PlayerStart showname|no layer|gmlayer


You can replace the image URL in the macro with whatever you prefer, so long as it is not a marketplace item (the API can't touch Marketplace items). This one produce a big red "X marks the spot", but you can use whatever you want, or get rid of the imgsrc command altogether and use whatever you dropped.

March 13 (4 years ago)
Nick O.
Forum Champion

Great stuff, Keith!