Keeping volume the same between saves?

Get help using Construct 2

Post » Thu Jun 06, 2013 6:44 pm

I recently added a volume slider to my game. It works on the main menu and if I start a new game, but if I try to load a save after changing the volume, it loads the previous volume.
If I could add "NoSave" to the global variable determining the volume, that would solve it, but I can't.
I have also tried creating a local variable called tempvolume, and when I load, I set tempvolume to volume, then load, then on load complete I set volume to tempvolume, but that doesn't work either! (I have a "wait 0 seconds" event between the two to make sure it successfully sets tempvolume correctly).
I don't know what to do! I want the user to be able to set a volume, and have that volume stay what they set it at no matter what. Please help?
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Thu Jun 06, 2013 7:07 pm

use the web storage to save the volume
B
40
S
11
G
7
Posts: 514
Reputation: 9,626

Post » Thu Jun 06, 2013 7:16 pm

Ah, that works! I'd never thought of that, thanks!
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Fri Jun 07, 2013 3:38 am

Edit: Ahh, never mind, I think I figured it out. I was just being dumb!MadameBerry2013-06-07 03:45:34
B
18
S
5
G
1
Posts: 96
Reputation: 2,680


Return to How do I....?

Who is online

Users browsing this forum: AkbarAsgharMG, Baidu [Spider], cjbruce, ephrisian and 10 guests