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

Combining the Functionality of [Aura Script] and [HP change announcer script]

I know I posted this before but it never got solved as well as I hoped. From what I understood was that the HP changer needed to have a handle token function but it didnt seem to work as intended. These are the two scripts I refer too. // By: DXWarlock //Script: Aura/Tint HealthColor //Roll20 Thread: <a href="https://app.roll20.net/forum/post/2139713/script-" rel="nofollow">https://app.roll20.net/forum/post/2139713/script-</a>... // By : HoneyBadger //Script: Altersbar Script //Roll20 Thead:&nbsp; <a href="https://app.roll20.net/forum/post/1216260/script-a" rel="nofollow">https://app.roll20.net/forum/post/1216260/script-a</a>... HoneyBadger did recommend trying to do this, but it did not work. :( Saevar, it should be as simple as adding handleToken(Target); at the bottom of AlterBar, third line up before the }); symbols. Target.set("bar" + Bar + "_value", CurrentValue -= AlterValue); } handleToken(Target); }); };
1453419244
The Aaron
Pro
API Scripter
<a href="https://gist.github.com/shdwjk/36025e18d770862abaa" rel="nofollow">https://gist.github.com/shdwjk/36025e18d770862abaa</a>... Enjoy!
The Aaron said: <a href="https://gist.github.com/shdwjk/36025e18d770862abaa" rel="nofollow">https://gist.github.com/shdwjk/36025e18d770862abaa</a>... Enjoy! Thank you so much &lt;_&gt;. I dont need to flick tokens after every hp change now.&nbsp;
1453447688
The Aaron
Pro
API Scripter
No worries! &nbsp;=D &nbsp;Happy Rolling!
1453479251
Alicia
Sheet Author
Been waiting for this solution as well. Thanks!
1453483804

Edited 1453484213
Alicia
Sheet Author
I just applied the modified script and it doesn't seem to be working. I tried moving the modified script to the end of the API panel (so it was the last one called). Didn't think it would matter, but thought it worth a shot. Made sure my Aura/Tint script was the latest. Even tried changing&nbsp; if('undefined' !== typeof HealthColors && HealthColors.AdjustToken){ HealthColors.AdjustToken(Target); } to if('undefined' !== typeof HealthColors && HealthColors.handleToken){ HealthColors.handleToken(Target); } Since I noticed there was no function for HealthColors.AdjustToken in the HealthColors Script. &nbsp; Am I missing something? Edit I removed the if statement around the function call and was getting this: evalmachine.&lt;anonymous&gt;:5206 HealthColors.handleToken(Target); ^ TypeError: Object #&lt;Object&gt; has no method 'handleToken' at evalmachine.&lt;anonymous&gt;:5206:26 at checkFinishedOps (
1453484205
The Aaron
Pro
API Scripter
That gist link has a modified HealthColors script as well, just scroll down a bit.
1453484241
The Aaron
Pro
API Scripter
It's easy to miss as mostly gists only ever have one file, but they do support multiples. =D
1453484246

Edited 1453484356
Alicia
Sheet Author
The Aaron said: That gist link has a modified HealthColors script as well, just scroll down a bit. I completely missed that......&nbsp; I'm used to looking at the first file so ya... I wasn't looking for a 2nd file.
1453484283
The Aaron
Pro
API Scripter
(Precognition for the win. =D )
1453485316
Alicia
Sheet Author
After feeling quite silly, it was immediately replaced with joy at seeing it work! Thanks again Aaron!
1453486407
The Aaron
Pro
API Scripter
No problem!