Check if the same object is in other position


So, i have the same object in different positions, and two of the objects in same X cannot be hided, only one of them can.
They ocasionaly end up hided in the same X, and i’m not sure what is causing it.
I’m struggling to figure out how to solve this.
Maybe the solution is to check if the same object is in other position? How to do this?

Or do i necessarily need to have different objects?

I leave the code i have at the moment and the screenshot to better understand what i mean:


I think the “platform is visible” condition will select all visible platforms, not just the one you want based on subsequent conditions.
You should assign an instance variable called “id” to your platform objects, and assign them a unique value. Then in your conditions check for “Variable id of platform = XXX” to select only the specific platform you want to take actions on.

1 Like

Not clear, sorry.
What does “same X” mean? Same X coordinates? On your screenshot, I see they share the same Y coordinates, not X.

1 Like

Yeah you’re right, i wanted to say Y.

So actually i think the solution was simple. At least, for many tries, it did not happen again.

In each condiction i said to show the object with the other coordinates.

1 Like

Yes i remove the “platform visible”. It seems it was doing nothing ^^