I’m an artist trying to learn Blueprints. Good fun, but slow going.
Top line is a group of simple buildings, generated one at a time in a ForLoop. I am altering the height of them randomly. My objective now is to add roofs to those buildings, at the correct height. Buildings and Roofs are controlled through two ForLoops.
My approach so far is to save those random building heights to an Array (line 1), and transfer those heights to the set of Roofs in another ForLoop (line 2).
I seem to have hit a wall on how though. I figure I need to use the ForLoop somehow as an index counter, but am stumped. Any suggestions?
Will depend on what Foundations can contain, but first you have another problem already, a “pure” function in BP (no white execution lines in/out) will be called once every-time it is used, so you are currently not storing the same value you scale with, they are two separate random numbers.
You will need to store the result of calling Random Float in Range in a variable (prefer local if in a function, consider putting this in a function if on a event graph).
So onto the main event then: If your Foundations (scene component?) contains ONLY static mesh components as children, then you can just use the index from the for loop you are in:
Sil, you are a legend and a star. I couldn’t have asked for a better or more informative answer. Thank you so much. Not at my machine right now, but I can’t wait to try this out.