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

Need help with calculating half damage on previous roll

I am in the process of creating a cloudkill trap for my players. I haven't been able to calculate the half damage for a successful save. nI don't know what I am doing incorrectly. Any help would be appreciated.  Thank you. &{template:default} {{name=Its a Trap!}} {{=The room is filled with a yellow-green gaseous cloud. Make a Con Save DC 15 Failed Save takes [[5d8]]  poison damage! Successful save takes half damage [[$[[0]]/2]] }} !Spawn --name|Cloudkill {{ --offset| 0,1 --light| 1,-5 --size| 8,8 --layer| object --order| toBack }}
You cannot reuse rolls in that way - a roll reference (such as $[[0]]) cannot be used in future calculations (except for some very specific niche cases). You can read more about reusing rolls here . However, you can do something like this (untested): &{template:default} {{name=Its a Trap!}} {{=The room is filled with a yellow-green gaseous cloud. Make a Con Save DC 15 Failed Save takes $[[0.computed]] poison damage! Successful save takes half damage [[ [[5d8]]/2 ]] }} !Spawn --name|Cloudkill {{ --offset| 0,1 --light| 1,-5 --size| 8,8 --layer| object --order| toBack }}
Jarren, Thank you for your help. Your suggested change works well, though I did add the round function to the dice roll calculation, in order to avoid any decimals. Thanks again!