how do I make a menu?

Non-platform specific questions.

how do I make a menu?

Postby effix » Wed Mar 29, 2006 12:09 pm

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.
User avatar
effix
 
Posts: 14
Joined: Sun Mar 19, 2006 7:37 pm
Location: Denmark
Score: 0 Give a positive score

Postby duracel92 » Wed Mar 29, 2006 6:24 pm

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
duracel92
 
Posts: 132
Joined: Sat Jan 21, 2006 10:45 pm
Location: UK
Score: 0 Give a positive score

thanks...but...

Postby effix » Thu Mar 30, 2006 7:33 am

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...
User avatar
effix
 
Posts: 14
Joined: Sun Mar 19, 2006 7:37 pm
Location: Denmark
Score: 0 Give a positive score

Postby Novice » Thu Mar 30, 2006 8:53 am

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();
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Excellent!!

Postby effix » Thu Mar 30, 2006 1:51 pm

It works perfect.. thanks..
User avatar
effix
 
Posts: 14
Joined: Sun Mar 19, 2006 7:37 pm
Location: Denmark
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron