Help Creating a Script that assigns text based on a total number.
I created a text field named [unit_section_totaldef] that sums up the values of other text boxes.
I also have 3 fields named:
- [unit_section_classification]
- [unit_section_baseAP]
- [unit_section_standard.move]
I would like to fill in each of the 3 fields with different text based on the value of the [unit_section_totaldef]:
- 0 - 75 = Class 1 | 1d8+2 | 5
- 76 - 150 = Class 2 | 1d8+2 | 4
- 151 - 225 = Class 3 | 1d8+3 | 3
- 226 - 300 = Class 4 | 1d8+4 | 2
- 300+ = Class 5 | 1d8+4 | 1
I believe it would be something with the collections fields, but the best I could do was if/elseif statements and thats not efficient.
Can someone assist me with this?
