# Populating scroll box with dynamic target array

**URL:** <https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409>\
**Category:** UI\
**Tags:** unreal-engine, Array, Widget, Blueprint, question, UMG\
**Created:** [October 25, 2016, 3:52pm UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409 "2016-10-25T15:52:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blastertoad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blastertoad](https://forums.unrealengine.com/u/Blastertoad)\
**Post date:** [October 25, 2016, 3:52pm UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/1 "2016-10-25T15:52:54Z")

</div>

So been banging my head on this for bit. I am doing a space flight game and am using multi sphere trace as a radar to find enemy units. What I need to do is get the returned array of actors and put them into a umg scroll box. This array will be refreshed each ticket and needs to clear and or update the scroll box. Final product would be a list of all targets in radar range.

---

<div class="post-metadata">

**Author:** ![MajinSephiroth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MajinSephiroth](https://forums.unrealengine.com/u/MajinSephiroth)\
**Post date:** [October 25, 2016, 4:26pm UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/2 "2016-10-25T16:26:42Z")

</div>

Make an array of enemy unit references in your radar widget.

On your radar tick (I really would not use tick for this), clear your scrolling list and populate it from your array of enemy units.

Now, you can update your radar’s array of enemy units from anywhere in the game and it will update the scrolling list with the relevant information.

---

<div class="post-metadata">

**Author:** ![Blastertoad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blastertoad](https://forums.unrealengine.com/u/Blastertoad)\
**Post date:** [October 26, 2016, 4:23am UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/3 "2016-10-26T04:23:12Z")

</div>

How should i update this if not by tick?

---

<div class="post-metadata">

**Author:** ![MajinSephiroth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MajinSephiroth](https://forums.unrealengine.com/u/MajinSephiroth)\
**Post date:** [October 26, 2016, 3:12pm UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/4 "2016-10-26T15:12:30Z")

</div>

You have two options.

1. Have your ship pawns have a “radar sphere” and when they overlap an enemy ship actor, trigger an “addToRadar” which would push that ship’s data to your player’s radar.

That way, only when a ship goes into your detection range it triggers the update. Rather than it triggering on tick whether or not ships are in range.

1. If you want the radar to constantly poll, then put it in a Timer that will trigger every 0.5s to 1s (1s is a pretty reasonable delay for a radar to be honest). This makes it so you free up that tick call.

---

<div class="post-metadata">

**Author:** ![Blastertoad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blastertoad](https://forums.unrealengine.com/u/Blastertoad)\
**Post date:** [October 27, 2016, 2:52am UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/5 "2016-10-27T02:52:57Z")

</div>

OK so I have set up a radar sphere with overlap events, the rest is in the photos below. These are the ship side blueprints

---

<div class="post-metadata">

**Author:** ![Blastertoad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blastertoad](https://forums.unrealengine.com/u/Blastertoad)\
**Post date:** [October 27, 2016, 2:55am UTC](https://forums.unrealengine.com/t/populating-scroll-box-with-dynamic-target-array/374409/6 "2016-10-27T02:55:25Z")

</div>

And here are the widget side blueprints
