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

TokenMod API Help- Prevent the rollable table for tokens from returning to index 1

I'm using the TokenMod API script for a game and a player brought up an issue to me that when using the following command as it causes some confusion !token-mod --set currentside|+ Using it with a number sometimes causes the token to loop back from the beginning, and continue moving.  Is there a way to get it to stop when it reaches the final number on the rolling table, instead of looping back and starting over? 
1621985059
The Aaron
Roll20 Production Team
API Scripter
Yup.  From the manual under SideNumber: If you preface the command with a  ? , the index will be bounded to the number of images and not wrap. In the same scenario, this would leave the above token at image 4: !token-mod --set currentside|?+3 In the same scenario, this would leave the above token at image 1: !token-mod --set currentside|?-30