Detect Position of Objects

I have multiple copies of the same object inside this oval.

And I want to divide their numbers equally to the ends of the oval like this.

How do I detect that both ends have equal copies of the objects?

Count how many have an x position less than centre of the oval and see if that matches with how many have an x position greater than the centre of the oval.

I’m having a bit of trouble. How do I detect 4 copies of the same object: 2 pairs each on the opposite sides?

Create a “For each object” event iterating over each object and keep a tally on whether the object’s position is to the left or right (so 2 variables, one for each side).

I’m really struggling to understand how to program this. If it’s not too much trouble, could you please show me how to do it?

How are you going to make sure the objects are moved to the ends inside of the oval and not moved to the ends where they look like they’re outside of the oval? Are the objects a set amount or does the player interact and cause more of them to be created?

Maybe If I put a collision detection on the side of the oval it won’t move outside the oval?

The objects are in fixed amount. The player just needs to grab a copy of the object and place it on each ends of the oval to which are detected.

Like this:

1 Like

Thank you so much @MrMen, I think I got it now. I appreciate your help.