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

Auto-calc different values in same field

1436027496
Axel
Pro
Sheet Author
Hey! I'm trying to create a drop-down menu where you get to make one choice that influences two diffferent input-fields with different values, like this: If choice A, then x=1 and y=2 If choice B, then x=3 and y=4 I hope I'm explaining what I want properly. Can anyone help me out?
1436033503
vÍnce
Pro
Sheet Author
I believe you can only have 1 value per selection. Brian may have some crazy math-based logical method however. :-)
If choice A is 1, and choice B is 2, then you could set: field_x's value = floor(1 -(((Choice -1) / ((Choice -1) -0.01)) / 2))*(1) + floor(1 -(((Choice -2) / ((Choice -2) -0.01)) / 2))*(3) field_y's value = floor(1 -(((Choice -1) / ((Choice -1) -0.01)) / 2))*(2) + floor(1 -(((Choice -2) / ((Choice -2) -0.01)) / 2))*(4) -W.
1436037274
Axel
Pro
Sheet Author
Hmmm... It seems like this will be a really really long line of math because I have more options that I can handle. I think it'll just be easier to enter the fields manually. The sheet doesn't have to do all of the work after all. Thanks for the good info Windsor.
Haha, yeah. My method probably works most best when you have only a few options, but a lot of fields that you want to affect. Maybe someone else knows of another way though. Good luck- -W.
1436041207
Kryx
Pro
Sheet Author
API Scripter
I tried to do this for a while as well, but selects can only have 1 value. If you can figure out the math to make that value adjust 2 things it'd work, but the select can only have 1 value.