In short-
-I'd like to make a button that selects a random set of objects and set its position to some where else.
-the action will be used again on occasions, so an object cannot be selected twice. once it has been picked, it shouldn't be picked again.
Intended purpose-
card game
In detail-
Say that I have a bib pile of objects in-game, and I want to make a button that will pick one of those objects at random and stick it some where else.
my first attempted was-
"I'll make a global variable, and when I click a button, it will set the variable to a random whole number between x-y values. If the value equals the UID number of an object, that object will then be set to position a."
Problems-
-if you have about 100 objects, it would be insanely tedious to make a statement that says, "if UID is equal to this global variable, then set position here." for each and every object.
-once an object is pick, it should not be able to be picked again, this method will not do that because it will still pick any of the same values it used during the last action
Any suggestions?