Any other methods to Reset Attributes
Hello, GSers!
I'v create a strategy game that got more than 500 attributes in game attribute. Atfer completing a level,it will return to main menu and reset all those attributes except several ones,such as:Unlocked levels,Coins...I really wanna use the "Reset Game" behevior,but that would reset all my saved attributes.
I know a method which is using "Change attribute" behavior to reset each attribute one by one. Anybody know other method?
Thanks for your help!
I'v create a strategy game that got more than 500 attributes in game attribute. Atfer completing a level,it will return to main menu and reset all those attributes except several ones,such as:Unlocked levels,Coins...I really wanna use the "Reset Game" behevior,but that would reset all my saved attributes.
I know a method which is using "Change attribute" behavior to reset each attribute one by one. Anybody know other method?
Thanks for your help!
Best Answer
-
Cluv Posts: 229
@zelhuang :
I am doing a strategy game as well. I think you can only use the "Change Attribute" for the moment because there is no way to write to tables. If you could write to tables you could create a table with all your initial attributes with a boolean that lets you know whether or not to reset the attributes. You could have another table that holds all of your current stats in the same order and then if the boolean was true (to reset the attributes) you could run a function that iterates through your table, resetting what was necessary and leaving what wasn't. The issue is, as I see it, that your attributes all have different names right now since they are global. Hence, you will have to change each one individually because there is no way for GS to understand them as a group. With a table, that wouldn't be a problem.
I hope that helps.
C
Answers
I think @Cluv was right.