I have a widget called handler with a horizontal box, I can populate this box with 3 other widgets, the problem is that when I randomly choose these 3 widgets sometimes 2 or 3 of them appear the same and I would like to avoid this happening to me.
This is my function for the random int, but it doesn’t remove the duplicates, does anyone have an idea how I could solve it?
Thanks for the reply! I had no idea that the shuffle node existed, I tried to do some tests, and although it seems simple I can’t do it.
I would like to make a small correction to the image I shared, it was a screenshot of modified function so I don’t use the for loop inside the function due its doing nothing (at least it seems) but I use for loop on event pre construct of a menu, so the nodes I’m currently using are composed as follows:
Even using shuffle instead of random doesn’t change much, furthermore I find it difficult to understand how to take only 3 names from shuffle if it doesn’t have an integrated output node.
But it’s generally more convenient to have functions do 1 thing. One generates data, the other populates something with the generated data. Handy when things grow in scope, and they always do.