Is there a way to override the value in a derived field?
I am working on defining a dragon's age catagories via a configurable tab. I have gotten it working except for displaying the starting HP. I want the value of that field to be dependent on which age catagory the user selects.
Here is the code I have tried (the script is within the base dragon race which the user selcted via theBackground tab... in this case Dragon, Black).
I am working on defining a dragon's age catagories via a configurable tab. I have gotten it working except for displaying the starting HP. I want the value of that field to be dependent on which age catagory the user selects.
Here is the code I have tried (the script is within the base dragon race which the user selcted via theBackground tab... in this case Dragon, Black).
Code:
Final Phase/10000
~ adjust starting HP for base dragon race
var ageCat as number
ageCat = tagvalue[Value.?]
if (ageCat = 1) then
field[rHPStart].value = 26
elseif (ageCat = 2) then
field[rHPStart].value = 39
elseif (ageCat = 3) then
field[rHPStart].value = 52
elseif (ageCat = 4) then
field[rHPStart].value = 65
elseif (ageCat = 5) then
field[rHPStart].value = 78
elseif (ageCat = 6) then
field[rHPStart].value = 91
elseif (ageCat = 7) then
field[rHPStart].value = 104
elseif (ageCat = 8) then
field[rHPStart].value = 117
elseif (ageCat = 9) then
field[rHPStart].value = 130
elseif (ageCat = 10) then
field[rHPStart].value = 143
elseif (ageCat = 11) then
field[rHPStart].value = 156
elseif (ageCat = 12) then
field[rHPStart].value = 169
endif