Why did I use Shuffle, but the position of the array element was not disturbed

If I don’t connect the first array to For each loop, the position of its array elements will be disrupted. Why?

I think what’s happening here is that the Shuffle & ForEachLoop operations are calling separate instances of the make array node. So basically during each call, a whole new array just gets created.

So try storing the make array result in an array variable, then shuffle this stored array, and then pass on the variable to the ForEachLoop. That should give you the intended result.

1 Like

OP, did you downvote Stormrage256’s answer? He’s correct - the reason why your array isn’t shuffling is because you’re never storing it anywhere for it to be shuffled. You’re creating it twice, once for the Shuffle node (which isn’t being passed so it’s a waste, really), and again in your forLoop.

Sorry, I didn’t veto it. I just tried his way and managed to solve the problem, thanks to everyone who answered the question.

So, Right click > promote to variable, and it works! (had to clarify cus it took me some time to find this out)