I’m building a turn-based game using Director to move between different control screens in my game. There’s a main view with several sub-screens that the player needs to go back and forth from to change settings. I need the variables to be stored when the player leaves the sub-screen and then comes back, so what’s the best way to do this? Right now I’m using a global for money, since I need that in every screen, and I’m planning to use a global table with each of the values stored away. Here’s a piece of the code:
subScreen1\_tb = {}
local sub1 = subScreen1\_tb
local sub1.value = 5
local sub1.value2 = 26
Since this is a turn-based game, my main priority is to make sure I’m building this in an efficient way once I scale it up to include more sub-screens and variables.
Thanks! [import]uid: 45104 topic_id: 12736 reply_id: 312736[/import]
