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

Can Concentration API observe !token-mod changes to HP bar?

Hello everyone,     I ran into this same problem with the DeathTracker API and the forums were amazing in their quick responses and help to fix, so I am back once again with a plea.  Just recently found the Concentration API and my players are loving it as they always forget to make concentration saves, but it only responds when you manually change Bar1.  Is there a way to have it listen for !token-mod changes for when we are using macros to apply damage?  Thanks in advance for any help :)
1538626239
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron is probably the best person to answer this, but he'll likely need to know which Concentration API you are using. I can think of two.
keithcurtis said: The Aaron is probably the best person to answer this, but he'll likely need to know which Concentration API you are using. I can think of two. It is the one in the 1-Click install by Robin
1538653877

Edited 1538653909
Jakob
Sheet Author
API Scripter
This is going to be very similar to the addition you needed to make for DeathTracker. You again have to register the handler with TokenMod in the registerEventHandlers function of Concentration. More precisely: if('undefined' !== typeof TokenMod && TokenMod.ObserveTokenChange){ TokenMod.ObserveTokenChange(handleGraphicChange);                 TokenMod.ObserveTokenChange(handleStatusMarkerChange); }
Thanks Jakob, that makes perfect sense.  Already inserted and tested.  You rock as always!
1538712920
The Aaron
Pro
API Scripter
Yes, that. =D