|
Say that I want to store the old stats in a variable like so:
@old_stats[i][2] = $game_party.actors[i].states
What happens is that when the states update, the old_stats actually update as well without me directly touching them. I'm guessing this is because it's a link -- because I directly made old_stats[i][2] the states.
If I do this it works:
@old_stats[i][2] = [] for i2 in 0...$game_party.actors[i].states.size @old_stats[i][2][i2] = $game_party.actors[i].states[i2].to_i end
But to be honest I've never seen this before and it looks pretty crappy. I'm sure there's a better way of disabling the link? Of making @old_stats[i][2] a simple variable on its own that doesn't automatically update. (Though if such a thing doesn't exist and the fault lies somewhere else, please do correct me.)
__________________________
|