I am learning how to make interfaces in the game engine, and I have set up 2 buttons: an exit button and a play button. When one of the buttons receives a left click, it either closes Blender or goes to another screen with a monkey.

The problem is that both buttons are doing the same stuff at the same time. They're switching scenes and closing the program, and the biggest problem is that I don't have to click on the buttons at all. When testing, I can click anywhere in the Blender and it does this.

Here is the .blend file if you need it.

up vote 8 down vote accepted

The Mouse Sensor when set to Left Button will send a positive pulse whenever the left mouse button is clicked. To get it to trigger only when over a specific object you have to add another Mouse sensor set to Mouse Over and plug it in to the same And controller as the click sensor. Like in the image below.
logic bricks

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.