buttons in the game engine...

alright this is stupid question, but ive never been much of a programmer. :slight_smile:

On my games main menu it has buttons. What kind of logic or python setup would I use to allow the player to click on a button to access a certain scene.(ie, clicking on “controls” to access the controls page)

Ive already gotten the system cursor to appear during gameplay with a couple lines of python, but not sure how to make it possible for the player to click on a button to access something…

Hello

You don’t need python to do that
You’ve Mouse Sensors
They’re not “perfect” but maybe they’ll do the job

You’ve a Mouse over sensor that reacts when the mouse cursor is over the
object …obviously
And you’ve a Left Right and Middle buttons Sensor that triger when you click the mouse buttons…re obviously

The problem (maybe?) is that the buttons Sensors will act everywhere in the scene and the Mouse over dont act on “click”

one ex solution?: Make the Mouse Over set True a property when over the desired object and make the Buttons Sensor only act WHEN the above property is TRUE

Is this clear??

Bye

aha! i found the problem…you see I was already trying what you suggested, but it didnt work…the mouse over sensor wasnt working at all. :-? It was because I had my camera set to “Ortho”…for some reason the mouse over sensor doesnt work when the camera is in ortho mode…which really sucks, but oh well…the menu still looks just as good when not in ortho for the most part…but thanks for the advice anyways! :slight_smile:

Oto, is this any better than linking the mouse over and mouse left to an AND logic brick?