How to use branch with a Random Interger?

Hello everyone !
I am new to the blueprint part of Unreal and I wanted to give it a try with a “simple” idea that I had in mind.
The goal after watching this video was to create a room that would have random parts generated each time I hit play. So far I can only spawn items independently.
What I want to do is: spawn a random wall and then spawn a random window frame that fits the hole shape.

As you can see, I’m checking the random integer to determine what window frame needs to be generated but when I click play, it doesn’t take in consideration the wall shape.

Of course I made sure that each piece referenced were matching.

Thank you,

SnapTouch.

2 Likes

Each time you call Random node it generates a new random number, even if it’s a single node visually. With this setup, your first Random node will give you three different results, but as I understand you need the same result three times, right?
Save the random value to a variable and then use it.

3 Likes

Yes that’s exactly what I want, thank you, I suspected the random node generating different number as the print gave me incoherent numbers. Do you know how to save this value as you suggested ?

Edit: I found it thank you again !

2 Likes