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

Help me fix my damage macro

This is the code: !token-mod --set bar1_value|[[{@{selected|bar1}-[[?{Damage|0}]]}]] --report all|"/em {name} takes {bar1_value:change} damage." Most of the time, it works. But I run into this odd problem where trying to make a token take lethal damage (say it's at 10 HP and I'm assigning it 11) doesn't work. Only part of the damage is applied.  Alternatively, if you have a better damage macro that actually works, post it here! :)
!token-mod --set bar1_value|-[[(?{Enter Damage no +/-})]] --ids @{target|Target 1|token_id} /em damaged @{target|Target 1|token_name} for ?{Enter Damage no +/-}
1590856957

Edited 1590870344
vÍnce
Pro
Sheet Author
!token-mod --set bar1_value|[[ {(@{selected|bar1}-[[?{Damage|0}]]),0}kh1 ]] --report all|"/em {name} takes {bar1_value:change} damage."
Thank you both! I'll try both yours out tonight.
Tried them both, and I think I prefer Vince's for single targets, because I'd rather use selected token as default. But I'll look at Bilbo's as the basis for a GM-only multi-target damage macro. Thanks again!