# How to get slider value and refer the widget at other Blueprint?

**URL:** <https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702>\
**Category:** Blueprint\
**Tags:** slider, unreal-engine, UI, Blueprint, question\
**Created:** [December 18, 2023, 2:48am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702 "2023-12-18T02:48:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faey01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Faey01](https://forums.unrealengine.com/u/Faey01)\
**Post date:** [December 18, 2023, 2:48am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/1 "2023-12-18T02:48:42Z")

</div>

I am trying to get the Slider value from the widget so it can change my new time on the timeline.  
The UI variable is set as UI\_Ship\_Selection Object reference.

My cast failed and i cannot get the slider value please help as i am new to Unreal Engine.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/9/56933ac857ad144a6ef6bc74b1a627bf84b9019e.png)

---

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [December 18, 2023, 5:55am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/2 "2023-12-18T05:55:40Z")

</div>

Hi, first here how casting reference work (in a simplify way)

BP (including widget bp) asset in your content browser are like non living things and are called **Class** (with the pin color purple).

When you drag and drop or spawn a BP asset into the level map, it become alive which are called **Actor** (with blue pin), it will also has a reference id, this id is assigned to the memory with the name BPMyName\_0. If we respawned that same BP asset, it will be BPMyName\_1. This is called instance of a class.

* * *

Now your variable UI need to store an actual value that is alive in the memory just like the screenshot below. (then you wouldnt need a casting in that case)  
Try to create your widget ShopSelection then store it to a variable in a event begin for example.  
And then try your slider.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/3/4135ad6816bc02431d09ab6e4f2ca2508ce2029b.png)

---

<div class="post-metadata">

**Author:** ![Faey01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Faey01](https://forums.unrealengine.com/u/Faey01)\
**Post date:** [December 18, 2023, 7:20am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/3 "2023-12-18T07:20:01Z")

</div>

Thank you very much for the explanation.

I manage to get the slider value now, i just now need to find a way to keep it update every time the slider are interact with as right now it only take the value once (because Beginplay maybe).

I am gonna try either the event tick or create custom event

---

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [December 18, 2023, 11:22am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/4 "2023-12-18T11:22:06Z")

</div>

you can try with this method:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/0/5004e3071bf63155c0b3f2b3db8015f726e13acc.png)

Bind event are delegate event / dispatcher, it act as a responding function to another premade function (which is the OnValueChanged of the slider)

---

<div class="post-metadata">

**Author:** ![Faey01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Faey01](https://forums.unrealengine.com/u/Faey01)\
**Post date:** [December 20, 2023, 1:32am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/5 "2023-12-20T01:32:35Z")

</div>

Thank you so much to @Arodi007 i manage to get the UI work as i wanted using the Bind Event. Thank you so much. All your explanation is easy to understand.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 19, 2024, 1:33am UTC](https://forums.unrealengine.com/t/how-to-get-slider-value-and-refer-the-widget-at-other-blueprint/1534702/6 "2024-01-19T01:33:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
