# Ue4 for each time this variable get +1 widget come in your screen

**URL:** <https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002>\
**Category:** Character & Animation\
**Tags:** unreal-engine, editor, UE4-26, UE4, Blueprint, question\
**Created:** [February 9, 2022, 7:47am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002 "2022-02-09T07:47:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [February 9, 2022, 7:47am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/1 "2022-02-09T07:47:04Z")

</div>

i want to make for each time variable add 1 a widget come in the screen how can i make this can anyone help please

---

<div class="post-metadata">

**Author:** ![HAF-Blade](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haf-blade/32/88718_2.png) [@HAF-Blade](https://forums.unrealengine.com/u/HAF-Blade)\
**Post date:** [February 9, 2022, 8:05am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/2 "2022-02-09T08:05:29Z")

</div>

Sorry but your question is not understandable for me.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 9, 2022, 8:43am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/3 "2022-02-09T08:43:49Z")

</div>

> [@Td1](#):
>
> each time variable add 1 a widget come in the screen

It’s literally this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/9/be960a224ffb915fd6239a10db43dff36132f1aa.png)

But I’m also sure that’s not what you _really_ want or you’ll need much more. So, yeah - seconded. Unclear, please add more details.

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [February 10, 2022, 3:52am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/4 "2022-02-10T03:52:52Z")

</div>

Okey i will give you an example When i lvl up i want widget come in screen say you leveled up so if the lvl varible got one added one widget come in screen

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [February 10, 2022, 3:53am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/5 "2022-02-10T03:53:21Z")

</div>

Okey i will give you an example When i lvl up i want widget come in screen say you leveled up so if the lvl varible got one added one widget come in screen did you understand

---

<div class="post-metadata">

**Author:** ![HAF-Blade](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haf-blade/32/88718_2.png) [@HAF-Blade](https://forums.unrealengine.com/u/HAF-Blade)\
**Post date:** [February 10, 2022, 6:58am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/6 "2022-02-10T06:58:40Z")

</div>

You can not attach a function on a variable change. Instead create a method/function which shows your widget and which attaches it to the viewport, like it is shown by Everynone.

Than call this method in the place where you are handling your level up. The best way to do this is to create a “level up”- method which handels the variable increase and the widget.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 10, 2022, 8:19am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/7 "2022-02-10T08:19:58Z")

</div>

> [@Td1](#):
>
> Okey i will give you an example When i lvl up i want widget come in screen say you leveled up so if the lvl varible got one added one widget come in screen did you understand

That’s what I posted. Call the event when you lvl up. Add a Delay and remove the widget from viewport to hide it.

* * *

> [@HAF-Blade](#):
>
> You can not attach a function on a variable change.

Yeah you can:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/e/fce5d39c8b04cc6e57b243389cac60ad218b7705.png)

If it does not work, just use a bigger 🔨

---

<div class="post-metadata">

**Author:** ![HAF-Blade](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haf-blade/32/88718_2.png) [@HAF-Blade](https://forums.unrealengine.com/u/HAF-Blade)\
**Post date:** [February 10, 2022, 8:34am UTC](https://forums.unrealengine.com/t/ue4-for-each-time-this-variable-get-1-widget-come-in-your-screen/496002/8 "2022-02-10T08:34:41Z")

</div>

Yes I also thought about replication but didn’t know if multiplayer is a thing at all. The idea is good but brings overhead to something simple like calling a method in the right place. 🙂
