Slider Widget

Not copy paste :slight_smile: I drew a line to show how did I get it.
It does not let me put the variable there.

If NewVar0 is the reference to the widget you created in the GameMode, drag a wire from NewVar0, search for AKPSlider LB (the green float).

Okay I managed it. Now I can access the variable in widget blueprint from level blueprint with both of your and Nebula Games Inc.'s ways. I can show it in the screen too but when I slide the slider it does not updates the variable on the screen. But if I print the variable from the widget blueprint it updates the varibale on the screen when I slide it unlike I access it from level blueprint and do the same things.

This method allows you to access the slider’s variable from anywhere, any blueprint. Useful stuff.

But if I print the variable from the
widget blueprint it updates the
varibale on the screen when I slide it
unlike I access it from level
blueprint and do the same things.

Is the Slider’s Value pin connected to the variable in the widget?

Alternatively, you can get the Slider79 and get it’s value directly - both should work.

Is the Slider’s Value pin connected to the variable in the widget?
It looks very complicated now I can’t see the answer of your question.

Get rid of Set NewVar1, get rid of slider79, get rid of Set AKPSlider LB (this one is optional, though). They’re not needed. The slim green float AKPSlider is your value here.

Go back to your widget and check if the slider event is updating the variable you’re accessing. In your image with the long red arrow they’re disconnected, for example.

I got rid of them and still the same. I can only print the first value of the slider (which is 0.0). This is the final version now.

It all looks good here. Can you show how you update the variable in the widget?

If I add print string next to it, it works.

Looks fine, and this is the widget you created in the custom GameMode and assigned to the NewVar0 variable?

Yes, exactly.

So the Print String code is just behind the Set AKP Slider LB, right? And what triggers the printing?

What are the chances that you’re using a slider from another widget?

Grasping at straws here :slight_smile:

There is only one widget and this widget has only one slider. :frowning:

So what is the default value of the widget’s slider then? Or the default value of the AKP variable?

If you print this at begin play and both are set to 0, you’ll see 0 printed, you surely have no time to adjust it to anything else.