[UE 5] Blueprint - I need a better way to control the loop

Hello. I really appreciate your help and I’m very sorry, but I did this stage in my own way, sorry for not putting the emphasis on the problem well. It is difficult for me to explain what I need in English, and I decided to draw what I need


The red “dots” are from where I need to generate the corridor (path to the next branch)

This is my selection function for this “brunch”. Where do I store boolean variables in order to later know in which direction I need to generate a corridor (path)

This is my method for generating the corridor itself (still in progress). And I’m stuck, I don’t know how to use a boolean variable, since all “branches” have several paths at once

I need smth like this in current version

In final i need add some rooms