Random integer in range is skewing variable value

Couldn’t figure out was wrong until I realized my integer variables were storing the wrong values.

Example:

X=0

W=100

Rnd=55

W1 = X + Rnd

W1 = 56? should be 55

W2 = W - Rnd

W2 = 48? should be 45

What is this? I plugged in a print string to confirm these vals at each node and there is no code executing after this point to change said values. If I plug in a literal integer in place of the random integer from stream the values do not get skewed so obviously this is the source of the problem.

I set a variable after the random stream and pulled values from that to make sure I wasn’t inadvertantly pulling multiple values and incrementing the stream, same problem.

Deleted the variables, created variables with new names, works… weird.

Hey BDC604-

After some investigation I found that the Initial Seed variable of the Random Stream node does not appear to affect the stream itself. This behavior has been reported here: Unreal Engine Issues and Bug Tracker (UE-52482) . Adding a call to Seed Random Stream or Set Random Stream Seed will affect the Stream if necessary.

Cheers