When you narrow down objects from an event like say
x => x is overlapping y
Is there an easy way to get the count of x that meets that criteria? I want to know HOW MANY Xs are overlapping Y.
Also I have a level maker that stacks floor pieces on top of each other sometimes. This is a natural byproduct of the level generation. I'd like to be able to clean it up though.
for each floorsprite
if floortsprite is overlapping another floorsprite (in floorsprite family), then destroy only the top floorsprite.
This is kind of difficult, because there's no way of knowing during the same loop whether a thing has been destroyed or not. It ends up destroying BOTH floorsprites.
Then, assuming I can only pick one how to get JUST the one on top?