Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Random streams with different seeds consistently return same number

Hi, I've been having an issue with random streams returning the same numbers as streams using different seeds. I've set the seed of the stream at begin play of the actor and told the actor to print a string of the seed it is using. I've then told it to print a random integer from the stream as shown in the image below.


I've got roughly 10 actors doing this all with different initial seeds as seen printed in blue however the red numbers they return are always just two different numbers.


I've tried changing the initial seeds to ensure it isn't just random coincidence but it just changes the two numbers that are chosen. These actors are down a chain of actors that have a random seed and then produce a random seed for the actor that they spawn, I think this might have something to do with it.

I have five tiers of actors spawning the next one down, giving it a seed variable from their random stream and setting the stream seed to that seed variable. The first four tiers of actors all produce completely random numbers but once it hits these actors they all produce the same two numbers. I don't know if it's just an inevitable result of the maths that they eventually converge to the same numbers or if there is something going wrong with my random streams but I'd really appreciate any help you could offer. If there is any other information that would be helpful I'd be happy to provide it.

Product Version: UE 4.16
blueprint.png (81.7 kB)
output.png (9.4 kB)
more ▼

asked Aug 11 '17 at 04:03 PM in Blueprint Scripting

avatar image

11 1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Make sure that the Random Stream variable is initialized, by making a random stream and setting the value to that.

more ▼

answered Dec 11 '18 at 11:11 PM

avatar image

1 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question