What's wrong with my volume controls?

I’m struggling because the volume button doesn’t work. it’s supposed to turn muted (grey) when clicked then turn blue (activated) when clicked again. but when it’s clicked it just stays grey.



1 Like

Trying to figure out the logic in those events is doing my head in.

It could be done in just one event. Make the Muted the first animation, and Unmuted the second animation. Then just use this event to control the global volume:

1 Like

A lot of my events give me a headache too :sob: The thing is its got a drag mechanism too so it’s quite complex. Anyway i’ll try this and get back to you thanks !

1 Like

What do you mean by a drag mechanism? Are you using a slider or button to control the sound?

If it’s any help (or anyone is interested), here’s a sound control button and pop-up slider I use, with events:

volume


Volume slider goes from 0 to 100:

3 Likes

That’s pretty handy, thanks for sharing. You made a function to save the progress? What does Add “” do?

1 Like

That’s a extension function I have for saving the g_gameSave structure. That can be ignored.

2 Likes

Wow this is super useful and exactly what I needed!! Thank you so much! I might make some changes because there are some things I don’t need but I will indeed use this as a template. For saving the volume value globally, could you elaborate on the mechanism behind your extension? Thanks !

1 Like

In a nutshell, it saves the g_gameSave structure to storage (in JSON form).

1 Like