Re: Newb Needing Help With Classes In BGT
hi,
I don't know when or how your loading your save data, but a lot of people prefer to load save data at startup, and save at exit or when needed.
What I would do is this:
Have the pagedown and pageup keys adjust the music, yes.
When you go to save, you write the value of the music volume to the dictionary.
When you go to load again preferably well before your game cycle even starts, you load that value into the respective music volume variable.
Since you want to use a dictionary, you might find the dictionary.exists check useful.
if(d.exists("1"))
This checks to see if in a dictionary called d, a key? Called 1, exists. Note, you will first need to deserialize your data back into a dictionary.
If it does and if you assigned the value of the music volume to a dictionary key of "1", get it from the dictionary.
The dictionary.get method is useful for this purpose.
This works for other values too, but kee
p in mind what you set your data and keys to.
Then, you can continue execution like normal and the volume should take.
Hope this helps!
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector