Premade rooms picking random locations

Flame
Thu, 03 Oct 2019 08:16:28 +0000
Blueprint

hi everyone. I’m trying to create a sort of random placing of rooms in my game, but i’m probably making something stupid. If i don’t use for loops and just try one random from the list, it works, but using for loops or doing 2 in a sequence keeps throwing me these errors(from my debugging i guess it means the results from the array are null)
i have currently 3 levels in the level array and 3 possible random spots(those are actors picked in the persistent level) where each room could spawn(so i am trying to use a for loop to iterate through each one of the levels in the array and choose a random spot.

another thing i noticed, is that no matter what when using the random integer, i never get my index 0 result from the array.
Hoping some guidance here. thank you very much.

4 posts - 1 participant