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

Can you use the max value of an attribute in a targeted macro?

1441806682
Cal
Sheet Author
Hi there, I was wondering if it's possible to check for the max value of an attribute if the macro is targeted. For instance, if you had an attribute called hp, and you use @{target|hp|max}, instead of getting the max hp of the target, it will ask you to select a target with with an alias "hp" and look for an attribute called "max". Has anybody found a way around this?
Hi Cal, Give this a try: @{target|token1|bar1|max} or substitute "bar1" with the attribute on the sheet. The spelling of the attribute is case sensitive. keep in mind that if you are using a sheet's attribute and it's a monster/npc, you probably aren't going to link the HP directly to a bar since that would change the values for all monsters on the same sheet. The reason for the use of "token1" is that you could have multiple things you want to target in a macro. If it weren't for this, you could only target one thing in a macro in which case, you'd probably just select the single token rather than need a target. It's outlined in the Wiki:&nbsp; <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> About halfway down is the section on target vs. selected.
1441958134
Cal
Sheet Author
I tried @{target|token1|HP|max} and it worked, thanks a lot.