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

Modifying an Attribute with ChatSetAttr and referencing it in the same macro won't work?

I've made a macro that modifies an attribute by adding 1. But when I output the attribute to chat it still appears as it did before !modattr, even though the attribute actually has changed.  This is the Macro: !modattr {{  --silent  --name Rhonas the Indomitable (Benji)  --Token_Size|1!!! }} /me Grows! @{Rhonas the Indomitable (Benji)|Token_Size} Any help would be appreciated, Thanks!
1588572192
GiGs
Pro
Sheet Author
API Scripter
Roll20 has an Order of Operations - the order it does things when you run a macro. It doesnt do things line by line. When you run a macro, it scans the macro for all attribute calls and replaces them with their values, and then does the work of the macro.  This means when you launch the macro above, it gets the value  @{Rhonas the Indomitable (Benji)|Token_Size} before  it runs the modattr command. There is no way to change the order this happens.
I was afraid of that... Thanks anyway!