PDA

View Full Version : Title Screen Menu



Kirkkaf
09-15-2010, 11:49 PM
Hi everyone,

I am trying to create my game from scratch (without using base scripts) I have having trouble with the title screen menu or intro as I am making my own. I have added text E.G "Start Game", "Exit Game" how can they detect mouse clicks?

Can someone help me buy writing a basic script to print something in the log once clicked "Start Game". Just so I know how entitys react to mouse clicks.

Thanks,
Kirk.

Seth
09-16-2010, 01:45 AM
Hi Kirk,

Check my app Myth Hunter, it uses a single script to control the main menu buttons for mouse control, instead of the normal example main menu stuff. The script it uses is in base/script/gui/mouse_button.lua.

What happens when clicked is controlled by whatever the entities "OnClick" data member is set to. (you would put in lua code here.. if you look at the properties of the main menu buttons in the example with the editor, you'll see it there)

Kirkkaf
09-16-2010, 02:15 AM
Hi Seth,

Thanks for your quick responce, I will take alook at this later on when I have finished work. Exellent engine supprised it's not more popular than it is already.

Thanks,
Kirk.