Random widgets not so random, help?

Hi guys,

I am trying to make a menu that has random buttons (abilities) like vampire survivors. I have the randomness working but when I try to remove an item from the array of widgets it’s removing them but somehow they are still selectable.

Desired outcome:

Usual outcome:

This is my current code, I’ve tried a few iterations all with the same result, this is just the last one i tried

because is not the same item :face_in_clouds:
you have 3 items example number 1, 2 and 3
when the flow enter on Create User widget, that node call the random array node and pick for example number “2”
when the flow enter in to the remove node, that node call the random array node and pick for example number “1”
so create a local variable and lock that random Item

and this is a cleaner way to randomize


if u have more than 3 item and u want only 3 u can change the “for each loop” and use “for each loop with break” instead

2 Likes

I’ll give this a try thank you

The top one worked, the other 2 I haven’t tried but they only glow into one vertical box, how would it work with multiple? I have 3. Either way I’m marking as resolved, thanks again.

you would have to make an array of vertical boxes and use the index of the for loop to select the one you need for each interaction

1 Like