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

GroupCheck and TempHPandStatus

Is there a way to make these scripts play nice together?  Since my wizard just got Fireball, I'm foreseeing lots of group saves in the future.  I use TempHPandStatus to mark when monsters are bloodied and dead, and they then get automatically removed from the turn order with another little scriptlet.  However, when I apply damage using Group Check (and ApplyDamage, of course), the bars adjust, but the tokens are not marked with Bloodied or Dead statuses, so it seems that TempHPandStatus is not activating.  It's not crashing the API, there are no errors, so I'm not sure what's going on, but is there a way to make these two scripts work together?
1524295033
Jakob
Sheet Author
API Scripter
API-triggered changes (for the most part) do not trigger API events, which is why the scripts don't work together. TempHP and status doesn't have an external interface for ApplyChange to plug into either. Here's what you can do: After line 109 of TempHP, add TokenChange: TokenChange, After line 91 of ApplyChange, add if('undefined' !== typeof TempHPAndStatus && TempHPAndStatus.TokenChange) {   TempHPAndStatus.TokenChange(token, prev); } That should probably work.
That seems to have done the trick!  Thanks!