Hey all, I’m currently working on a widget slider which is setting a cube scale on the X axis. In the Event Graph of my widget blueprint I’m calling an Event Dispatcher to do so and everything is working fine.
However, when I’m dragging my slider from 0 to 1, the cube will gradually change from its initial scale to its new scale value, and I would like for this change to be radical without going through intermediate values.
So how could I lock my slider to either select my initial scale value or select my new scale value ?
Here are some screenshots of my blueprints :
My final project is to set different values for my cube X axis scale and to bind it with my slider steps. I’ve managed to do create steps for my slider, with a Float Variable linked with the value of the slider.
So, my other question is how to bind different scaling values of my cube with the slider “steps” ?
I’ve just started learning about blueprint so if anyone can point me in the right direction that would be great, thanks !
Sliders work best with a consistent scale, so numbers like “0, 50, 100, 150”. If that’s doable for you, great! Set that multiplier on your event to the scale # you want, and use the ROUNDED number on your widget instead of the pure float!
If you’re going for something like “1, 7, 11, 500, 17352” you’re probably going to need to use another kind of interface, like a set of buttons.
And you CAN use a slider for this. It’s just more complicated because it would likely have to pass through a selector and you’d set the selector to have the values you’d want.
@Patfoodya1 Do what Everynone has here, I always forget about map variables! This should get you exactly what you need! And if it’s permanently only the X value (or a single value being adjusted with no change to others), you can make the second variable of the map a float instead of a vector if needed.
It’s like I was thinking with a selector but smoother and in a nicer package as a variable.
Sorry for the late reply, but it’s working ! I would have never thought of using a Map Variable in this case, thanks so much @Mind-Brain and @Everynone for your help
It leads to another question on my side, since my values are now listed inside the MAP Variable, how could i do to tell Unreal to use these values instead of the multiplier in the Custom Event ?
For now, it’s working if my cube has at the start a O scale value assigned in the X axis and a 1 multiplier added to my Initial Cube X Scale Variable. But, I was wondering, if my cube doesn’t have a O scale value in the X axis, is there a node or something else to use first my Initial Cube X Scale variable and then my New Scale Parameter variable ?