I have a sprite which has a private variable that functions like UID (although not exactly the same purpose as UID), and I regularly use For Each Object (ordered) to loop through the instances of this sprite using this private variable. Instances of this sprite regularly get destroyed and created throughout the course of the game, and the private variable is unique for each instance upon creation of the instance.
For any given sprite instance with a given private variable, I want to pick another sprite instance (using Families, since this sprite is in a Family) that has the next highest (or lowest) value of this private variable. And I can't assume that the next highest or lowest is just +1 or -1 away, since the sprite instances with these values may have been destroyed.
In short, how do you check if a sprite you are picking using Families exists or not? I need to know this, so that if it doesn't exist, I can keep searching for the next one.