Page 1 of 1

how do I make a menu?

PostPosted: Wed Mar 29, 2006 12:09 pm
by effix
Im trying to make a menu for my pong game.
I have 4 buttons and an actor (o) to select the buttons with..
I should look something like this:

o - Play
- Options
- Exit
- Credits

First how do I make my 4 images (play, options, exit, credits) buttons?
How do I make the actor (o) select my button "play" when i press "enter"?
The only thing I have odne so far is made the actor (o) move up and down.

PostPosted: Wed Mar 29, 2006 6:24 pm
by duracel92
Creating a menu....

Hmm...

Well, im not sure how to make a menu but I know how to make auto plays.
I'll tell anyway since im bored senceless...

start a new game, and add an actor for a background.

Like this one off my game:
http://img226.imageshack.us/img226/5346/hostme8ok.png

then, add 4 more actors, give them the button graphics.
Add 4 more actors, MAKE SURE THEY ARE ALL FILLED REGIONS!!! And then put these round the button images.

finish off with a couple of text actors naming what buttons are where etc.

it will look like this.
http://img137.imageshack.us/img137/8725/hostme17um.png


-------------------------------------------------------------------------------------

on the filled regions make mouse button down events, scripting a way to access the files.

hope this helps

thanks...but...

PostPosted: Thu Mar 30, 2006 7:33 am
by effix
Thanks for your suggestion, but my problem is that I cant use the mouse beacuse its a game for win mobile..
My problem is how do i select the buttons with another actor...

PostPosted: Thu Mar 30, 2006 8:53 am
by Novice
Do a button integer global variable.
On key down(up)-->Script editor-->
Code: Select all
button--;
if (button<0) button=3;

On button down(down)
Code: Select all
button++;
if (button>3) button=0;


on the "o" actor put this in draw actor
Code: Select all
if (button==0) y=10;
else if (button==1) y=20;
else if (button==2) y=30;
else if (button==3) y=40;


on key down (enter or wathever)
Code: Select all
if (button==0) Load game (new game.....
else if (button==1) Load game...
else if (button==2) Switch to options...
else if (button==3) ExitGame();

Excellent!!

PostPosted: Thu Mar 30, 2006 1:51 pm
by effix
It works perfect.. thanks..