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 .
×

Target HP | Max

Just a quick question... why does this macro: /w gm &{template:default}{{name=**Wildshape @{target|npcname}**}}{{HP=@{target|HP|Max}}} yield this error: I know if it were pulling from a specific sheet and not just from a targeted creature it would work fine... but for some reason it doesn't want to register the target's max HP for this readout. So... What am I missing?
@{target|hp_max}
Try this /w gm &{template:default}{{name=**Wildshape @{target|npc_name}**}}{{HP=@{target|target|hp|max}}}
Thanks, I'll try both!
1590245176

Edited 1590245226
Oosh
Sheet Author
API Scripter
From memory you need to specify a target label when grabbing a |max attribute, or else it gets confused and thinks the first part of the Attribute is the label. The label can be whatever you want, though if it matches the label used in any other @{target} call then it will grab the Attribute from that same target  without having to re-click it. So it tends to be good practice to just always throw a label in there when using @{target}, e.g. {{name=**Wildshape @{target| t1 |npc_name}**}} {{HP=@{target| t1 |hp|max}}} Even though you don't actually need it on the npc_name one. Also gives a macro a bit more clarity if you have multiple targets, t1, t2, t3 etc.
1590248861

Edited 1590254975
Oh alright, I'll also give that a shot then. Fortunately, this is just a wildshape macro, so it's not targeting more than the one creature, but this being my first foray into targeting macros I'm not surprised I hit a small error wall. 
Thanks Andrew P.! Adding t1 to the macro fixed that problem, as well as an issue I had later trying to make an attack macro using the same @{target} concept. This worked wonderfully.