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

Macro assistance

Trying to write a macro for a friend that will automatically subtract 1 ammo from his character sheet whenever he fires his bow. I have so far gotten then macro to subtract 1 from his current ammo and show his remaining, but upon 2nd use of the macro it wont subtract another arrow, only ever subtracts 1 from his maximum. Below is the code I am currently using to subtract the 1 arrow, obviously I am doing something wrong since the rangedammo1 variable is not saving, any help would be appreciated {{Ammo= [[-1 + @{selected|rangedammo1} [rangedammo1] &{tracker}]]}}
1448153260

Edited 1448153297
You can't without using an API script or SheetWorker.
are you sure of this? I feel as though it should be possible, I can get an input of the ammo minus 1 I just need that variable to save within the tracker
Yeah, I'm positive.
Damn I felt like i was so close too :(. How could I go about doing this for him?
1448153568

Edited 1448153600
The current and maximum values of @{rangedammo1} are stored within the Attributes & Abilities tab on the Character linked to the selected Token. While a macro can provide the Turn Tracker with values, the reverse is not possible (at least, without the assistance of an API Script).
Are there API scripts already made to assist with ammo tracking then? If so, can someone please provide a link with installation instructions? would be much appreciated
TheDangerBox said: Are there API scripts already made to assist with ammo tracking then? If so, can someone please provide a link with installation instructions? would be much appreciated Ammo is a popular choice. See also: <a href="https://wiki.roll20.net/Script:Ammo" rel="nofollow">https://wiki.roll20.net/Script:Ammo</a> <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... <a href="https://wiki.roll20.net/API:Use_Guide" rel="nofollow">https://wiki.roll20.net/API:Use_Guide</a>
Thank you both for your very quick answers
1448155062
The Aaron
Roll20 Production Team
API Scripter
Note: API Scripts require the game to have been created by someone with a Pro subscription.
The Aaron said: Note: API Scripts require the game to have been created by someone with a Pro subscription. yeah got that already, our host IS using the highest sub gate, thanks again for the help from all of you