Click event runs perpetually
I have a level select screen where the user selects which house they want to explore. When they click on the house an overlay appears that shows them the information about the house, such as the name of the child who lives there, their high score, best time, etc. Then they can either click "Go!" to enter the house, or click the "X" to close the overlay and select another.
The way this works is the overlay elements are off-screen. When the user selects a house the appropriate graphics are set and the entire thing is moved on-screen.
Everything was working fine until I got to the house in the upper right. Notice that the house sits directly below the close box for the overlay. When I tried to close the overlay that house's overlay was immediately opened with no way to close it because the house below the "X" was also getting the click event.
I couldn't figure out a way to stop a click event from propagating to elements below the top object (is there a way to do this?) so I created a new Game attribute called "Level Select Open." Quite simply, when a user clicks on a house that attribute is set to true. When the close box is hit it is set back to false. That should have fixed it, but it didn't.
What's happening now is whatever house I click on shows its overlay and as soon as I close it the overlay reopens. The reason for this, as far as I can tell, is that the click event only has to be triggered once and then everything inside that Rule will run perpetually.
How do I get the overlay code to stop running? I've tried various ways to implement this logic and nothing has worked. I even put a delay on the close box before resetting the game attribute in case things were just happening too fast but now the overlay just pauses for however long the delay is and then reopens. I'm kind of at a loss here.