# Random item from array

**URL:** <https://forums.unrealengine.com/t/random-item-from-array/386611>\
**Category:** Blueprint\
**Tags:** array-nodes, unreal-engine, Blueprint, question\
**Created:** [March 1, 2017, 1:59pm UTC](https://forums.unrealengine.com/t/random-item-from-array/386611 "2017-03-01T13:59:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mblogest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mblogest](https://forums.unrealengine.com/u/mblogest)\
**Post date:** [March 1, 2017, 1:59pm UTC](https://forums.unrealengine.com/t/random-item-from-array/386611/1 "2017-03-01T13:59:41Z")

</div>

hi, i have a array with 9 item,i want to select 3 item of this array with random without repeat,and this is my blueprint,why not working correct.

 ![128272-untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/1/411dc9359127f79b8b9f75a8d2a2f3ce89cc0a24.jpeg)

---

<div class="post-metadata">

**Author:** ![DigitalMage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigitalMage](https://forums.unrealengine.com/u/DigitalMage)\
**Post date:** [March 1, 2017, 5:14pm UTC](https://forums.unrealengine.com/t/random-item-from-array/386611/2 "2017-03-01T17:14:48Z")

</div>

The blueprint you have is a bit convoluted and the delay mode is an immediate red flag for me.

The easiest way to handle this is probably a while node (I think that should exist).  
Basically : while outarray.length\<3, pick a random element, add to the array without duplication

I’m away from my computer right now but I can rig up a blueprint for you when I’m back, if my description doesn’t make sense.

---

<div class="post-metadata">

**Author:** ![mblogest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mblogest](https://forums.unrealengine.com/u/mblogest)\
**Post date:** [March 1, 2017, 7:35pm UTC](https://forums.unrealengine.com/t/random-item-from-array/386611/3 "2017-03-01T19:35:40Z")

</div>

if you show me a smaple of your blueprint,thnks  
beacuse in my logic blueprint random array in somtimes has repeating

---

<div class="post-metadata">

**Author:** ![CryShader](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CryShader](https://forums.unrealengine.com/u/CryShader)\
**Post date:** [July 24, 2017, 8:22am UTC](https://forums.unrealengine.com/t/random-item-from-array/386611/4 "2017-07-24T08:22:14Z")

</div>

you can shuffle array and select first 3 items from it
