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 .
×

Perform a task on all selected tokens?

I have been searching the forums and documentation (with no success) for a clue on how to do things like the following examples: - Add 10 HP to all of the selected tokens. - Add a condition to all of the selected tokens. - Remove a condition from all selected tokens if they have it applied. - etc. Another example: 1. User (the GM) drags to select a bunch of minion tokens in the map. Adds another using Shift + click. 2. Runs imaginary script "Kill these" 3. The script iterates over the currently selected tokens, and for each with a HP attribute or specific Bar, it sets that token's HP value to 0. - Done. The key is currently Selected, not selected after the macro/script is run. All of these examples count on the script being able to process on an array, or list, of currently selected token objects. Any pointers here? Is it even possible?
1416711701
vÍnce
Pro
Sheet Author
You might have a look at Aaron's TokenMod script.
Bingo! Had looked at that mod, but did not notice that it could change more than 1 token at a time. Just tried it on a few items selected at once and it worked. Seems to do what I need, will dig further to see how it does this...Thanks!
1416718985
vÍnce
Pro
Sheet Author
NP. Thank The Aaron.
1416747207
The Aaron
Roll20 Production Team
API Scripter
:) Thanks Vince! Let me know if you need anytging else. :)