I'm trying to get my program to efficiently pick random instances of an object. Everytime it picks a random instance, I want that instance to be removed from the next round of picking.
I thought I could do this by destroying the instance after it has been picked. To my surprise, destroyed instances are still being selected when I use the "Pick a random (object) instance".
I have a simplified .capx to illustrate my problem. My goal for this little example is to have 10 of the red squares destroyed and only a single "X" appended to that square's text box.
Is there another way to do this? Perhaps use an array and remove items from that array and have the array automatically shrink so that I know whenever I randomly pick a point in the array, I'm guarenteed to pick an item and not an empty space? Kinda like an ArrayList in Java. Thanks