Dissonance
Member
So I have a money system where I've converted the gold variable into gold[], with each array element being a different currency. I have it displaying in the menu correctly, i have battles giving me gold correctly, shops, everything works fine. The system itself isn't my problem.
I use a global variable called '$goldtype', defined in class Game_system, def initialize, to determine what the currency is for each region in the game is. So when you walk between regions, a scriopt call will do $goldtype=2 to switch gold[$goldtype] from gold[1] to gold[2].
However my problem is, the game doesn't save the value of $goldtype! When I save, quit, and reload the game, $goldtype is back to its initial value every time, despite being set at 1 or 2 or 3 or whatever in game.
how do i fix this? do i need to define the global variable somewhere else? or use a different kind of variable?
I use a global variable called '$goldtype', defined in class Game_system, def initialize, to determine what the currency is for each region in the game is. So when you walk between regions, a scriopt call will do $goldtype=2 to switch gold[$goldtype] from gold[1] to gold[2].
However my problem is, the game doesn't save the value of $goldtype! When I save, quit, and reload the game, $goldtype is back to its initial value every time, despite being set at 1 or 2 or 3 or whatever in game.
how do i fix this? do i need to define the global variable somewhere else? or use a different kind of variable?