Integer changes value when going through a BPI.

I have ran into what I can only describe as a bug or a really weird issue, simply put, I have a random integer being made in a script, I am then transferring that value to another script using a BPI.

But when the value comes out the other end, it is different than the one that I input on the first script, resulting in this weird double randomizer effect.

I will post my BPs here so you can see what I am talking about;


The first script, the one that generates the value.


The second script, the one that retrieves it, no where else is this being ran.

And here are some of the results I am getting;
image
Yellow is the input and green is the output.
image
image
image

I can’t for the life of me figure out why it’s doing this, any help to solving this problem would be appreciated.

/Amoebozoa

A green node runs every time a value is requested. They call that a blueprint pure method., A blue node does not.

Not a bug, it’s classic evaluation. Every time you access a pure node, it gets executed. You generate 2 random values. Connect it like so instead:

Same goes for the Print. You actually generate 3 values.

haha nice timing :). It’s a weird design choice for blueprints. Actually whenever you make a C++ function const like void Test() const exposed to blueprint it will show up as a green “pure” node, unless you mark that UFUNCTION as BlueprintPure = false. Every single one of my hundreds if not thousands of methods are set up as BlueprintPure false :smiley: to not disturb the white execution line any further in BP and to prevent accidental re execution. what a waste of performance.

I think they should make it a “blueprint only” feature, that you should be able to right click a node and mark it as green or blue.

That appears to have done it, thank you for the help, I was baffled by why it was causing this problem. But as a sidenode, I only started using the print string on the + node after I swapped from a clamp node. I was previously using it on the variable output. And it was yielding the same results random results then.

But nevertheless, it appears to have been fixed, thank you for taking the time and answering my question.

/Amoebozoa