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

Selected Token List

Hi,    I am trying to make a script to set the properties of groups of tokens. I need to test whether the tokens are selected or not and then to rename them sequentially ( Goblin 1, .., Goblin 100 ). It would also be handy to only search through tokens only on the page I am editing so I would also like to be able to get the pageid of the current page I am editing. I have been looking through the API help documentation and there doesn't seem to be any way to do this. Jack
msg.selected will get you what you need.
1462031584

Edited 1462032123
I am posting the finished script on a new thread with a new title.  Thanks SkyCaptain XIII for your help.
Nice, This would have been handy two days ago. So it requires IsGM installed?
Jack, before you reinvent the wheel, you should look into TokenMod.  It is a very robust script that lets you easily set token properties.