# Loops in binding functions

**URL:** <https://forums.unrealengine.com/t/loops-in-binding-functions/560221>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 18, 2022, 12:35pm UTC](https://forums.unrealengine.com/t/loops-in-binding-functions/560221 "2022-05-18T12:35:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlainAndAverage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PlainAndAverage](https://forums.unrealengine.com/u/PlainAndAverage)\
**Post date:** [May 18, 2022, 12:36pm UTC](https://forums.unrealengine.com/t/loops-in-binding-functions/560221/1 "2022-05-18T12:36:00Z")

</div>

I have a collectible that I am trying to link to a widget that will show a text box when collected. I have a boolean that is set to true when the collectible collides with the player.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/d/81dd777ac4b2e502ea7fe924a313734073cc386b.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/f/1bf77e9dd5de9cb9c4ed4df85a5a02731a8a1503.png)

I have already attempted creating a loop in the event graph to no avail.

How would I go about creating a loop in the widget that constantly checks for the boolean to be true, and when it is true it will show the text box?

---

<div class="post-metadata">

**Author:** ![Pantoth](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pantoth/32/1194538_2.png) [@Pantoth](https://forums.unrealengine.com/u/Pantoth)\
**Post date:** [May 18, 2022, 1:11pm UTC](https://forums.unrealengine.com/t/loops-in-binding-functions/560221/2 "2022-05-18T13:11:57Z")

</div>

Don’t know if I understand you correctly, but having the Widget constantly checking for Collectibles doesn’t sound efficient. Better way would be the opposite: Let the Collectible communicate to the Widget, but only once, when the pick-up event is fired.

Blueprint Communcations! I highly recommend watching this video.  
Min. 21:24 gives you an example of how stuff in the game world can communicate with the UI. Not exactly what you need but it shows you a concept of how it could be achieved.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/4/c04b72f0c2350fe16cce0a9795c662a495694f67.jpeg "Blueprint Communications | Live Training | Unreal Engine") ](https://www.youtube.com/watch?v=EM_HYqQdToE)
