Download

Executing chunks of blueprint in random order, can I clean this up?

I want to be able to execute slightly different chunks of blueprint in random order. Something like this:
random code

That doesn’t work since the for loop doesn’t wait for the delay nodes. If the delays would be the same I could modify the loop to wait but that doesn’t work. I ended up doing my own loop:
First attempt

Then I added a timer and tried adding support to “loop the loop”, which was probably stupid because I can probably just call “Do N” on the event/macro if I can make one. Anyway this is what I ended up with and you can ignore the stuff “selected” in red, since that is only for looping it once/twice:

Slight overkill

Can I make this nicer and not have to worry about copy pasting and creating arrays and indices and stuff? We can assume that all arrays/switches will have 6 items. I can’t create a custom event in a macro and even if I could I don’t think I could call it from outside the macro anyway? This code/macro would never run concurrent with another.

Cheers,
Daniel