Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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?
Develop games in your browser. Powerful, performant & highly capable.
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
only thing it didn't mute was looping sound for some reason, but I managed to workaround on that issue.