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

Using custom token markers in script?

Wondering if its possible to use a self-made token marker pack's icon in a script. I want to replace the bleeding eye status with a token market called 'downed' in my custom pack, but i cant seem to get it to function, but it works with all the default markers if(ShowDead === true) { if(curValue > 0) obj.set('status_bleeding-eye', false); else if(curValue < 1) { var DeadSounds = state.HealthColors.auraDeadFX; if(DeadSounds !== "None" && curValue != prevValue) PlayDeath(DeadSounds); obj.set('status_bleeding-eye', true); SetAuraNone(obj); } } }
1680658905
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try installing LibTokenMarkers. It contains a lot of utility functions for working with Token Markers and their images.
1680679550

Edited 1680679830
Yeah, I'm not a scripter at all, all looks like jumbled nonsense to me so Im 100% unsure what to do with that Lib
1680695467
David M.
Pro
API Scripter
When setting a custom statusmarker with a script, you'll need to use the full name::number  syntax. The easiest way to find this is to open your TokenMod help handout and scroll to the statusmarkers section. All of your custom markers installed in that game will be there along with the corresponding id number. Note the double colon. So, it might be something like "downed::123456"
David M. said: When setting a custom statusmarker with a script, you'll need to use the full name::number  syntax. The easiest way to find this is to open your TokenMod help handout and scroll to the statusmarkers section. All of your custom markers installed in that game will be there along with the corresponding id number. Note the double colon. So, it might be something like "downed::123456"