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

Quick API [Help on Custom Token Markers]

1612553171
Michael I.
Pro
Sheet Author
I have not used it in a while and forgotten how we call a custom token marker now from API  here is the api call for current default token marker. { tokens.forEach(function(token) { // #98000 token.set('status_half-heart', '0'); }, this); } else { tokens.forEach(function(token) { // transparent token.set('status_half-heart', false); }, this); } If I remember we have to change the call and not just  replace half-heart with name of new custom token marker? but I don't remember what that call is any help is appreciated
1612555441
The Aaron
Roll20 Production Team
API Scripter
You need to get the tag name for the status you want to set.  Looking at the help for TokenMod is probably the easiest way to do that.  You can then just use that instead of where you have half-heart above: token.set('status_TheMoonAndStars::13412352', '0');