I have several defense values that combine into one master defense value. simplified version:
Code: Select all
$ dArmor = 10
$ dNatural = 20
$ dTotal = dArmor + dNatural
I have a Stats screen that displays all of these values. simplified version:
Code: Select all
screen stats:
vbox xalign 0:
text "Armor Defense: [dArmor]"
text "Natural Defense: [dNatural]"
text "Total Defense: [dTotal]"
Armor Defense: 10
Natural Defense: 20
Total Defense: 30
I have a menu system where one of the options adds 1 to dNatural
Code: Select all
$ dNatural += 1
The screen displays as:
Armor Defense: 10
Natural Defense: 21
Total Defense: 30
How can I make the dTotal variable update with the new dNatural value?
Or, is there a better way to do this? As I've said, I'm very new to ren'py, so everything I have is mostly the result of trial and error.