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 .
×
Advertisement Create a free account

Repeating Section Help

1620092427
YaktheMad
KS Backer
I am looking for some guidance working with a repeating section. I want to calculate a carried weight total from an equipment list. My initial thought was to have an on change script fire when someone made an edit to the list. Every item in the list will have a checkbox to toggle whether the item is being carried or not. Every item will have a weight. If the item is being carried, then add the weight to the total carried weight. So psuedo code wise: for each(repeating_equipment) {     if (repeating_equipment_carried == 1) totalweight = totalweight + repeating_equipment_weight } I am just not sure how to cycle through my repeating section. Any guidance would be greatly appreciated!
1620111208

Edited 1620146226
vÍnce
Pro
Sheet Author
I normally bash scripts with a hammer and brick to make them work, so I'm not one to give sheetworker advice, but you should be able to use TAS (The Aaron Script) to handle summing repeating attributes.&nbsp; Here's a recent post that might help:&nbsp; <a href="https://app.roll20.net/forum/permalink/9992186/" rel="nofollow">https://app.roll20.net/forum/permalink/9992186/</a>
1620143481
YaktheMad
KS Backer
Thanks vÍnce , I will take a look! Yeah I am a square peg round hole kind of programmer too...