How to reset game ?
Add some
Member Posts: 48
Hey guys i want make a button on menu and when i click this button all the levels in the game will be reset ?
Comments
Hi @Add some The most effective way to do this is to make all your attributes accessible from a Table.
Providing you copy a master table with the initial settings to another table for use, when you press your reset button, you can reload the initial settings of your attributes.
Another way without a Table is if you use Load Attribute and Save Attribute. In your reset button, put a list of Load Attributes with your attributes set to their initial values.
A bit sketchy but that's it in a nutshell.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Yo bro i use two index ( unlocked level , current level ), what i put in rest button...?
Change attribute game.Current\game.Unlocked :to: 0. Or do, when button touch is pressed :do: reset game.
I make two behaviors or two rules in button ( reset ) or what bro ?
Yes. You would make a rule in the button that says :
-when touch is pressed
-:do:
-reset game.
OR you could make a rule in the button that says:
-if touch is pressed
-:do:
-change attribute game.CurrentLVL :to: 0
-change attribute game.Unlocked :to: 0
Yo bro i choose one of this rules you mean...?
Yes @Add some. Whichever one you want to use. The first one resets EVERYTHING. The second just changes the scores of those certain attributes.
Thanks a lot bro
You're welcome! Hope it works out