I have an object that I would like to perform a certain action, only if there are two or more instances of the same object next to each other (say under 100 pixels). What’s the best way to do this? I’ve tried different things and can’t get it to operate as smoothly as I like.
Thanks so much if anyone has experience with this type of thing!!
You could create a circular sprite that is 200 pixels in diameter, place it where your original object is, and see how many of objects the same as the original object it collides with (I think “Number of Objects” will do this for you once you check for collision).
If you use it as a subevent of the collision detection, I think it returns the number of objects that match the collision conditions (i.e. how many are included in the collision). Try it out and see.