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

[Script] character token locator

June 09 (12 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Sometimes when I transition to a new map, my players have trouble at first finding where their tokens are, especially if it's a large map. 

This script provides a chat command for locating a character token by name or for locating all character tokens you control. It works by expanding your token's aura to the map's edge, and then shrinking down to the token's location, so you just have to follow it as it shrinks. 

To use it, enter "!find me" to find your token(s), or "!find Dave the Dwarf" to find a token named "Dave the Dwarf". Then just follow the shrinking aura.

It works best on maps that aren't almost entirely covered by fog of war, since that sort of covers up your auras. :/

Here's the script: 

https://gist.github.com/Cazra/5737747

June 09 (12 years ago)

It would be really great if the API could force a ping at a location, or better yet a pull pin (the DM's shift+ping) to pull them to the location. This is an awesome substitute! Great job :)

June 09 (12 years ago)
Konrad J.
Pro
API Scripter

Good job, great idea!  Something similar was on my list to do,but the list is growing ever larger instead of smaller. :)  You should add a teleporter to this script, seems a natural fit.  I haven't done it yet, but my idea was the GM has a token that is the marker for teleporting (or it could be simply by a grid system, but that would be harder to figure out for the GM).  Then where ever he puts it and then type teleport players or something like that then the tokens would get moved there.  You can do it on an individual basis as well.  At them moment I don't think we can change the page ID of a token yet so teleporting to another page (which would be the most useful I feel) is out.  But still it could be a quick way to get everyone to a particular spot on the map.

June 09 (12 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Right, there isn't currently any support for creating or removing graphic objects. That would be a very useful thing to have in the API though! 

For teleporting a group of tokens to the marker, it would be important to keep track of their relative positions so that everyone doesn't end up piled up on the same spot. With a little math, I don't think this would be hard to pull off though.Thanks for the suggestion!