Buttons not retaining images after scene change
DaveGWelsh
Member Posts: 60
Hi,
In my app I have the option to change the time it can be played for; infinite, 2, 5 or 10 minutes. Whenever the user taps on a button, that button changes to green.Also, infinite is set as default. This part is no problem However, this is what happens next.
When the user goes back to the main menu and then goes back into the options screen, the buttons have changed and now show the default setting again, in this instance, infinite is the highlighted option. I've created a few temporary actors to display the values and, by all accounts, it should work, but it doesn't.
I set it up by having the buttons call variables such as 2active and setting that to true or false. If it's true, it turns to green, if it's false, it reverts to default.
Any help/assistance anyone can give would be great.
Thanks in advance!
In my app I have the option to change the time it can be played for; infinite, 2, 5 or 10 minutes. Whenever the user taps on a button, that button changes to green.Also, infinite is set as default. This part is no problem However, this is what happens next.
When the user goes back to the main menu and then goes back into the options screen, the buttons have changed and now show the default setting again, in this instance, infinite is the highlighted option. I've created a few temporary actors to display the values and, by all accounts, it should work, but it doesn't.
I set it up by having the buttons call variables such as 2active and setting that to true or false. If it's true, it turns to green, if it's false, it reverts to default.
Any help/assistance anyone can give would be great.
Thanks in advance!
Best Answer
-
colander Posts: 1,610@welshkiwi if you stick an @ in front of their name the system will send an email letting the person know about the post.
Every time you change the value in your attribute you must change the value in the table with the "Change Table Value" behaviour and save the table with the "Save Table" behaviour otherwise it won't remember it.
Answers
EDIT: In this situation I always save it to a table. Then on my main menu I have a actor off scene called Load Saves which has a bunch of attributes set to the saved values in a table. I put it at the bottom of all the other actors so when a player goes to the main menu it is the first actor to load and run. Apparently GS loads all the actors from the bottom up.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
I'm not having much luck at the moment. I change the table value and it works initially, but then it doesn't seem to allow any further changes. Any words of wisdom?