# Streams not working in structs or arrays

**URL:** <https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697>\
**Category:** World Creation\
**Tags:** random, unreal-engine, stream, Blueprint, question\
**Created:** [February 22, 2015, 4:50am UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697 "2015-02-22T04:50:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [February 22, 2015, 4:50am UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/1 "2015-02-22T04:50:58Z")

</div>

I have just been converting a simplish blueprint to be modular but have hit a bug or something; streams don’t work when in structs nor arrays, or at least, none of the ‘get random \*\*\* from stream’ do.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [February 23, 2015, 8:32pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/2 "2015-02-23T20:32:12Z")

</div>

Hi WarLord,

Which version of the editor are you currently using? Also, could you provide a couple screenshots showing your setup?

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [March 3, 2015, 9:58pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/3 "2015-03-03T21:58:35Z")

</div>

Hi WarLord,

We haven’t heard back from you in a few days, so we are marking this post as resolved for tracking purposes. If you’re still experiencing this issue, please feel free to post back here with additional information I requested above.

Cheers,

TJ

---

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [March 6, 2015, 10:32am UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/4 "2015-03-06T10:32:25Z")

</div>

Sorry for not replying. but you should be able to reproduce this issue if you make an array variable of random streams, get the first one (in the construction script) and using it for anything; it won’t work.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [March 6, 2015, 9:37pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/5 "2015-03-06T21:37:24Z")

</div>

I attempted to repro this in 4.7.2 but so far I haven’t been able too. Which version are you using? Also, could you post a screenshot of your setup to make sure we are doing this the same way?

---

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [March 11, 2015, 6:35am UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/6 "2015-03-11T06:35:12Z")

</div>

I am also using 4.7.2 and this is my setup

[http://i.imgur.com/j2kFY2X.jpg](http://i.imgur.com/j2kFY2X.jpg)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [March 14, 2015, 7:00pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/7 "2015-03-14T19:00:45Z")

</div>

What behavior are you seeing in the editor? Is the object not rotating at all or is it rotating initially and then doesn’t rotate again?

---

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [March 19, 2015, 5:16am UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/8 "2015-03-19T05:16:30Z")

</div>

It rotates initially (always to the same rotation no matter what however) and then does not change rotation later.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [March 19, 2015, 1:59pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/9 "2015-03-19T13:59:52Z")

</div>

In the setup that you are using, that is the intended behavior. You’re creating an array of Streams but then you are only calling the Stream at the ‘0 Element’ over and over again.

Here is how Random Streams work. When one is first created, the random stream will generate a random rotation (or whatever type you are using), then if that same stream (seed) is ever called again it will always return the same rotation.

I’m not sure if you are familiar with Minecraft but it is similar to the way world seeds work. When a seed is created, a random world is procedurally generated from it. That seed number can then be used again to recreate the exact same world.

From the docs:

“where you want a random effect, but also a consistent distribution each time the graph is evaluated.”

Please take a look at the [Random Stream documentation](https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/RandomStreams/index.html) for more info.

Cheers,

TJ

---

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [March 19, 2015, 8:30pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/10 "2015-03-19T20:30:35Z")

</div>

Yes I understand how they work, it’s just they they aren’t when not straight variables, ie. If I create a standard variable of a random stream and change it in the level after placing one of the blueprints, it works and the rotation will change depending on what the random stream’s value is, but when they are in any sub sort of class, like an array, they don’t return any value other than what appears to be 0.  
Thanks

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [March 20, 2015, 3:07pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/11 "2015-03-20T15:07:00Z")

</div>

Sorry about that WarLoad, I misunderstood the issue. I was able to reproduce this behavior in 4.7.3 and our latest internal build. I have entered it as JIRA UE-12223 and our developers will be investigating the issue further. We will post back here with updates as we have them.

Cheers,

TJ

---

<div class="post-metadata">

**Author:** ![Oscar\_Cooke-Abbott](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oscar\_Cooke-Abbott](https://forums.unrealengine.com/u/Oscar_Cooke-Abbott)\
**Post date:** [March 20, 2015, 3:23pm UTC](https://forums.unrealengine.com/t/streams-not-working-in-structs-or-arrays/307697/12 "2015-03-20T15:23:12Z")

</div>

Ok, thankyou 🙂
