Sometimes my blueprint branch fails to recognize the true case, and instead returns false. The first image below shows the branches. The final false should never be reached as the second image shows it is always fed an integer from 0 to 2, but the print statement is still reached sometimes. I can fix the problem by feeding the false of the last branch into the true of the first branch, but that does not seem like an optimal solution.
When this prints that it’s not int , what is value of the random integer. ?
It varies from 0-2, so it can fail with any int.
Hi man , its not a bug.
Every time your Branch get the int , he access the Random generator and every time get another int.
Here , i access the same Node:Random int in range, and pass it to the graph.
I just access the same pin , but that pin is not a variable, neither a local variable, is a connection with a nod.
and the node release a random int.
so asking to print the same pin, you will get always a random int.
so to fix this, just assign the random int to a variable(or a local variable), and compare that.
May it only fails on 2 or 1, just print value of the random int when it fails.
Thanks, I didn’t even think of that! Works perfectly now.