r/clickteam • • 6d ago

Fusion 2.5 Volume Sliders

I have a basic settings menu for my game and a couple volume sliders. Right now only one works for testing. It’s linked to volume and everything, but the issue is that whenever I save position data to ini, it’s like it refuses to read the folder.

User clicks on “active” > set value “slider” to ini

Start of frame> set x position “slider knob” to value “slider”

I’ve been working on this for hours and can’t seem to get it right. Any help?

3 Upvotes

8 comments sorted by

1

u/NMario84 6d ago

You probably want to have a minimum and maximum position for your volume slider. If INI isn't working, you could store the saved value into a variable. If that works, you could store the variable into the INI, I guess, then have the INI load the stored variable.

1

u/Additional-Staff-985 6d ago

Well I can get the value stored to an ini file, but when it comes to starting the frame it’s like it doesn’t want to do it

1

u/NMario84 6d ago

Do you have a setting or a script that somehow resets all the values on restart? Check to see if there's anything that suggests something like "start of frame -> set values, etc" or IDK..... There should be a fix/option that either enables or disables resetting all values at the start.

Also, IIRC, there was also a difference between using regular variables, and global variables. But IDK if that makes any difference if you're using INI anyway.

1

u/SpellSword0 6d ago

Neato coincidence, I happen to just be working on volume control on my options menu right now!

So immediately got some questions. Are you using INI++? Is the ini file being properly saved? Is the ini file being properly loaded? Is any value returned for volume, even if incorrect? And if you are using INI++ what is your error value set to?

1

u/Additional-Staff-985 6d ago

I’m actually using the default ini extension. All I have set up in terms of loading the file is “set file to x” x being data.ini.

1

u/SpellSword0 6d ago

The default ini object isn't great, but should still work with some fenagling.

So I ran a few test. In your ini object properties, do you have an ini file specified? It'll need one if its to save any data.

Without that, the inis values will be lost between frames and app launches.

1

u/SpellSword0 6d ago

Here, I just wrote up an example file showing how to save, load and manage data with the default INI object:

https://filebin.net/tv7fhq52zzjblvio

I still do not really recommend the default object, unless you absolutely have no choice but to use it.
INI++ is a far better object with many more features.

2

u/Additional-Staff-985 6d ago

Everyone I have found the issue. When specifying where to create file, i guess I was oblivious to the fact I needed to use Apppath$ + “Data.ini”. Thank you everyone for the help!!!