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] Ping Buddy

1663312091

Edited 1687634564
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very simple script that has three functions. [ Video Demo ] [ Code ] PingBuddy Follow a Party Token If you create a token and name it "Party", or set the tooltip to the word "Party", the screen will ping pull to the token whenever it is moved. This allows you to guide players around the map or across an overland map. This is done without the distracting circle animation. I developed this when trying to take players from one area of a city map to the next, while allowing them to keep their bearings. The constant animation and the need to click, drag, release, shift click and hold was tedious and messy. The circle animation is removed by temporarily setting the GM's player color to transparent, and then reverting it. It is possible if you make too many rapid movements in succession, it won't revert the color before running again and stick the GM color on transparent. If this happens, just re-assign the GM player color manually. If you set the "Party" token to be an invisible token (marking it with an aura only you can see), it allows you to center the player view to any area of the map without animation. If two or more party tokens are on the same page, the screen will ping pull only to the one that was last moved. Another use would be a board or wargame where you want to call attention to the last piece moved. Just make sure "Party" is in the nameplate or the Tooltip. More behaviors are explained below. Tooltip Codes Instead of naming the token "Party", you can set the token's tooltip to the word "Party" for the same behavior, and name the token as you will. There are four codes currently: Party : Behavior is same as naming the token "Party". All players will follow the token without animation. Ping :  Behavior is same as naming the token "Party", but all players will follow the token with animation. Pingme : Token will pingpull only the controller. They will see animation, but no one else will be affected. Pingmesilent :  Token will pingpull only the controller. They will not see animation, and no one else will be affected. This will only work if the player is on the page with the player flag. Capitalization does not matter. Pull Players to the Start of a Page Whenever the player flag is moved to a page, all players on that page will immediately be ping pulled to the "Party" token. The token may be moved to the gm layer if you wish, and players will be pulled to that part of the map. This is useful for encounter maps that don't start in the upper left corner. This code is taken almost in entirety from a script by Nick Olivo (link below*). His code is much cleaner and nicer than mine. Thank you, Nick!  Find a Token  Find my token If a player types  !pingme  into chat, the screen will ping pull to the first token it finds that they control. If they control no tokens on the screen, the script will inform you. This is useful for large maps, or if a player loses track of their token in Dynamic Lighting or Fog of War. Find token by name If you type a name after  !pingme , separated by a space, the script  will find the first occurrence on the page of a token with that name. Ex. !pingme Bob Will ping pull the first token it finds named "Bob". Spaces and capitalization count. Pingme commands will only work if the player is on the page with the player flag. All of these functions are demoed in the video. *Thanks to Nick Olivo for most of the code on the page start function. His script can be found in its original form here .
1663482689
Ralph
Pro
Marketplace Creator
This is great! Does the party-token need to reside on the token-layer or can it also be on the GM-layer?
1663486985
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
GM Layer is fine. This is probably the best way to create a starting point for a map.
You're a genius. :-) Just tested this and it works perfectly. Now, to see if it works for my players...
1663513673
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can't take credit for the starting point function. That's Nick O's code.
1664059072
GiGs
Pro
Sheet Author
API Scripter
This looks very handy.
1664061692
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks! I've become fairly dependent on the Follow function.
1664265068

Edited 1664265646
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Minor tweak. The Party Token can be identified by placing "Party" in either the nameplate or the tooltip. This allows a little more creativity in the party name. It can be the image and name of a vessel, or a caravan, or a magnifying glass, a pointer, crosshairs, or any image or have the name of the specific party, a rival party, a ship name, etc.  If two or more party tokens are on the same page, the screen will ping pull only to the one that was last moved. Another use would be a board or wargame where you want to call attention to the last piece moved. Just make sure "Party" is in the nameplate or the Tooltip. Edit: Also, you can set the Tooltip to "Ping" instead of party, and this will restore the ping animation, in case this behavior is desired. Code is updated.
1664349067
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Two new behaviors. pingme and pingmesilent in the tooltip will cause a token to pull only for the controller of the token, with or without animation. Useful for players who always want their token centered on the VTT. Code is updated.
1665202145
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
New Feature: Pingme by name Placing the name after a !pingme command will find the first occurrence on the page of a token with that name. Ex. !pingme Bob Will ping pull the first token it finds named "Bob". Spaces and capitalization count.