Hello,
I am struggling a bit with getting my clock to update after a change in my game settings.
I have a countdown clock that works fine on my play.lua page I have a settings.lua page where the user can choose that the clock to be set to 60 seconds, 90 seconds or 120 seconds.
When I launch the app all works well. When I go to the settings page and change from say 120 seconds to 60 seconds and then save to the settings.json file with loadsave, that all works correctly too.
My problem is that when I go back to the play.lua page, the clock does not automatically update from the 120 seconds to the 60 seconds. I know the correct data is saved and loaded into the scene as I checked it with a print function but it is not displaying that data. It displays the original data of 120 seconds and only updates to the correct 60 seconds when I click the timer reset button.
I thought that each time the scene loads it would read through the code again from the top and display the appropriate text as it does when I launch the app. Forgive my newbieness but is it because I have all of the code in the scene:create section and it only runs once unless a touch event or some other function occurs?
Thanks in advance for any guidance!
Christi
