Volume resets when exiting app
aurynstar
Member Posts: 41
Hi everyone!
Not sure if this is a bug or I'm just missing the answer.
I've implemented Tshirtbooth's slider volume control. By default, my volume is set to 1 with the slider all the way to the right.
If I...
1. set the volume to 0 (slider all the way to the left),
2. leave the app by pressing the home button,
3. re-enter the app
...the game resumes as it should, but the volume is back to 1 even though the slider is still all the way to the left.
Has anyone else experienced this or have a possible solution?
Thanks
Comments
You'll need to Save the value of the volume when it's set and Load it when you re-start the game. You could either use the Save and Load Attribute Behaviors for this or do it using a Table.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c
Thanks for the suggestion and I've given it a try with both loading and constraining the attributes, but same issue.
Just to clarify, this only happens when I exit the app (NOT completely closed) and then open the app again. The game play continues where I left off, which is normal, I believe, but the music is back to it's default setting of 1 even though the saved value is still 0.