For now i send the value in a global variable via Interface blueprint, but i need a tickevent to get values from the slider.
it would be better to fire only onValueChanged.
I assume you already set the input mode, and show the mouse cursor, so you can actually change the slider. This should be a fully working example of what I understood you need. As said, I am new to Unreal Engine, so if there is a better way I would love to hear about it.
Just wanted to say thank you, I’ve been digging through tutorials, examples, etc. all day just trying to pass a variable from one blueprint to another using casts, events, etc but pretty much every example is either “Ok I’ve already created this and that and here’s where you tie them in” but they don’t bother to show how certain things were created or “Here’s 3 sliders all doing this stuff” and they zip all over flipping between blueprints showing tons of connections but never really explaining how things are passed. I just needed a foundation to start, and got that right here. So thank you, got all my stuff working!
This has been helpful, but I was really confused on some of the steps, but I think I learned some things that would be really useful for someone else as new as I am:
At Step #8 you need to “create the widget” and “add to viewport”, you can do that by right clicking in your level blueprint and search for “create blueprint”, then when the node is there under class select the name of the blueprint you made earlier. Then to add to viewport click and drag off the top right empty port on that same node, then when you release type in the search “add to viewport”
Step #10 had be baffled for a while, initially I was creating a new event dispatcher in the level blueprint as well called MySliderChanged then dragging it in and selecting assign to get the two nodes, but this apparently is wrong and those new nodes are not attached to the one in the widget even though the names may be the same. Instead I tried having two windows open (the widgetBP and the levelBP) then I dragged the MySliderChanged event that was under the MyBlueprint tab>Event Dispatchers and dragged it all the way over to the LevelBP and once I let go of the button I selected assign.
Wow. So good explanation! I actually was trying for 1 month from time tio time to call event and only after your explanation i finally understood how to do it, thanks!
Hi everyone!
I had a problem with this tutorial. It works fine but just once after i begin play, and that’s it. When i try to click a button on widget - nothing happens. What may cause this?
Hi, I have a question. If I don’t want that the Widget Blueprint to be visible from the beginning of play, will it work if I don’t add it to the viewport?
@HKonashevyhc Consider asking a new question rather than bumping a 4 year old thread.
If I don’t want that the Widget Blueprint to be visible from the beginning of play, will it work if I don’t add it to the viewport?
You can add / remove widgets from the viewport at any point, it does not need to be on Begin Play. You must store a reference to the created widget, though. Dereferenced widgets will be destroyed.