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

OGL One Attack, Two Resource Boxes

I am using the OGL sheets with the companion API and I'm going to be playing a gunslinger. Right now I have a box for the # of rounds in the gun and a box for the # of rounds total. I have been trying to work out a way that both the boxes would be used when I click on the guns attack instead of just one of them. Anyone have any ideas?
1650344220
John D.
Pro
Sheet Author
getAttrs on the values of both boxes, subtract the same number of rounds from each value, then write them back to their respective attributes.
1650383642
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
To be clear, John's suggestion is how you'd do this in a custom character sheet. For your use case, I'd probably recommend having the companion script just handle the ammo in the gun, and then make a reload macro using Aaron's Ammo script or the ChatSetAttr script.
Thank you