Pick a random object from a group and not pick it again

I want to make a “choice” system, when the scene begin, I want to show 3 random object from a group.
I placed 3 “placeholders” and i move an object to a placeholder for each placeholder. But sometimes it picks an object already on a previous placeholder. I just want to make sure it picks a random object that is not displayed at screen.

Hi munh, and welcome
This post:

and this example from E1e5en in that thread will help you

1 Like

Thank you, it helps !
But this is for a displayed text, and I want to affect objects, not text, I don’t know how to adapt it :frowning:

Extend on what @Bubble wrote, and instead of numbers, put in object names.

1 Like

Thank you I managed to do it ! The only thing I want is to delete a chosen string value from an array (like : remove the 4 from the array [1 2 3 4 5 6]

I tried the “splice” option, but it deletes an element from an index and not a specified value

Use "Remove variable at index...". In your example, the 4 is at array position 3 (arrays are zero indexed, meaning the first position is 0, second is 1 etc), and you’ll need the action :


It will remove the variable, and automatically shift the variables forward a position to fill the spot (only those after it - the variables before the removed variable don’t move).

Nevermind, it seems to work by deleting index before shuffle, thank you sm !