How to change graphics settings through slider?

I’m trying to make graphics setting sliders simmilar to those in whitcher 3, so the value changing UNGRADUALLY, when reaching certain value, will change one certain parrameter. Is there any parameter similar to: (If Slider Value > 25 Do “something”)

Hi there
If a slider outputs normalized floats from 0 to 1, you want to save your options in an array of float values, let’s say 0.25, 0.50, 0.75 and 1.00. Then, connect the output from the event “on slide value changed”, then get the float array and connect to a “contains” node and a branch. Only “do something” if you’re getting true from the branch. You may need to use get and find nodes to convert the selected value to a string, and plug a “switch on string” accordingly based on the selected array element.

You can setup slider steps
image

I’m little bit confused on 4th step. How to convert the value to the value? Do I have to use “Clamp” nodes?

Well. I now discovered better method. Can you please tell me, will it work or not

Yes, I know that’s not panacea for all settings, and then I will stuck again, when trying to link slider value to screen resolution or maybe game difficulty. So the question is still open.

The issue with this will be that you’ll set quality a lot of times when moving the slider. But sure, why not, it should work. Or maybe try OnValueCommitted instead.
My idea above virtually did the same, it had values from 0 to 3, representing Low, Medium, High, and Epic, but with no values in the middle.
I don’t think 4-Cinematic can even be used in games; so I guess 0-3 is all you need.

Screenshot_394

Also, changing the “Set Shadow Quality” value doesn’t affect anything. Do I have to make some kind of “apply” option in settings menu to apply the changes?

Yes, I believe you have to Apply Non-Resolution Settings after changing any quality.

Select the green output of “get vale” and right click search for “to string (integer)”. That will create a variable converter with only two pins. Select the pink output and right click search for “switch on string”. Your contains is missing the array variable. Make sure to search for “contains array”.

Here is how I converted my game settings to be controlled by button clicks, but it could have been used for sliders:

For any other who are seeking for graphic setting adjustment like me. After 1 day I found the sollution.

Also thanks to Tuerer and L.F.A who helped me to find the solution.

1 Like

By the way, I made 4th setting, just to match the maximum. If I will separate the slider to 3 points, in my opinion, it may create infinite numbers like 1/3.