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

Its a Trap help (Trying to use TokenMod to auto apply damage to Bar 3)

After hours of trying to determine how I can accomplish this task using ItsaTrap API, I've finally come here for help Basically, trying to create multiple traps that, when a token activates it, it will automatically apply the damage rolled to Bar 3 where I hold the HP for my tokens. I just cant seem to figure out the scripting to make it work :( I believe it has something to do with finding the value or part of the script that ItsaTrap uses to calculate its damage. Any help would be appreciated greatly! 
1666356496
David M.
Pro
API Scripter
The following will remove 3 from the bar3_value. If you add a exclamation after the number (e.g. -3!) it will stop when it gets to 0hp, otherwise it will go into negatives. !token-mod --set bar3_value|-3 Not sure how ItsaTrap works with this. If it uses vertical pipe characters then it might get confused.  If that's the case you can substitute a # for the | in the token-mod command, e.g.: !token-mod --set bar3_value#-3!
Thank you for the fast response! That makes sense for the api. I'm not at home to test it but weeks that apply the damage rolled from itsatrap to the bar value for damage? I'm trying to create a situation for my players to average traps that will apply damage to a large number of NPCs at a time to speed up the game