Annoying pressed/released function active after The brain has passed it

Basically, I’m making buttons on the brain, I’m trying to make it so after you choose the square, screen clears, and you pick the color of the cube.

The problem occcurs after the code leaves the while loop of the first “window”(the one with start positions) and goes into looking for the cube, for some reason the last Brain.Screen.pressed is still running the function that’s in it? Is it a bug, or am I doing something wrong?

the pressed method registers an event handler, once registered it will run every time that event fires, so yes, you are doing something wrong. Post the code.

2 Likes