You can add instance variable called "Number"
Set different value for each object. Then use these two conditions:
Object is invisible, Object pick highest/lowest "Number" - set Object visible.
There are other options where you don't need this additional variable, for example:
Object is invisible, Object pick nearest to (x,y) - set Object visible