8
$\begingroup$

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.

$\endgroup$

1 Answer 1

8
$\begingroup$

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

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .