Game Difficulty Management
|
|
This is somewhat related to the Timer discussion.
Is there a way to have the value of a variable persist across runs? From what I have read, what I have in mind is somewhere between "Reset Simulation" and "Reset Vars". Assume: D g_GameLevel = 1 V GameScore = 0 V if (GameScore>=10,g_GameLevel=2,g_GameLevel=1) Reset Simulation would [re]set g_GameLevel = 1. Reset Vars would leave g_GameLevel = 2 but would also leave all other decision variables equal to their last value. I am looking for (I think) the ability to selectively override Reset Simulation so g_GameLevel remains = 2, but all other decision variables are reset as they would be for Reset Simulation. So the game would be a "fresh start" but with more difficult dynamics. I have looked in the documentation and was not able to find a combination of components and parameters that would accomplish this end. Bill Braun |
|
|
Hey Bill,
The best way to do this right now is a bit un-orthodox, so we may create a better one in the future, but here goes: You will want to use the Reset Vars action, and as you know this will reset time to 0, but leave all decisions values to their default. Then make a Scenario object, called default run settings (or something like that) where you type in what you want the initial values for all variables to be after the Reset Vars. (You make scenario objects in the Document Settings Panel). The on any button where you do a reset vars, add a Set Scenario action, which sets the default run settings scenario. This will allow you to control the values of the variables you care about, but leave the variables that you do not want to change as whatever they were in the previous run. Make sense? If not feel free to ask questions! Billy |
|
|
Hi Billy,
That sounds like a plan. Thank you. Bill |
Please log in to reply to topics.