I have problem with sounds, I have sounds on and off button on one layer and it works when I toggle the sounds on and off, but when I go to play screen the sounds come back on because play layout always resets all global variables.
How can I reset all the variables except the sound?
Or is there some other way to get it working?
There may be a better way, but basically I've done one of two things...
1. use an array with one value
2. before you reset globals, set a local variable called 'PreserveMute' to the value of Mute. after the reset, set 'Mute' to 'PreserveMute'.
I'll go and test your method and post results later
Develop games in your browser. Powerful, performant & highly capable.
only thing it didn't mute was looping sound for some reason, but I managed to workaround on that issue.