Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / need help with trying to create a simple menu

Author
Message
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2003 01:05
I do alot of HTML so i figured the best way to create a simple 2D menu was to Map an image (like in html) and having like "links" going to different parts of the game ( i would suppose labels).
So i tried this:



well it didn't work.

Two Q's.

1)Am i going the right way about this.
2)What am i doing wrong, how should i correct this

Thanks to anyone that can help
WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
Moggie100
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 27th Apr 2003 02:22 Edited at: 27th Apr 2003 02:23
Question 1 is simple to answer - you're doing it half right.
Question 2 may take a little longer.

What you're doing right is that you're specifying half of the button, but not the other half. So, by saying:

"if mousex()=>100 and mousey()=>300 and mouseclick()=1"

What you're actually telling the computer that if the mouse is above or equal to 100 pixels away from the left side of the screen, and the mouse is 300 pixels or more away from the top edge, and if the mouse clicks with the left button do the action.
This means that anywhere on the screen that is =>100 pixels in the x axis and =>300 pixels on the y axis is where the button is, which is one BIIIGGG button :-s !

(--------------------------------------------------------------------)
If I may pause a mo, u're not helping yourself by compressing alot of 'if' statements onto one line, if you get alot of 'if's you cannot see them all on the screen and this can get confusing, try separating the 'if's out like I do, it may help you understand the code better.
(--------------------------------------------------------------------)

To show you how to specify a box-area-button is easier than telling you so look at the following code and you shoudl see what your doing wrong.



Just say if u have any problems with this, but I'm sure u wont x-d

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 27th Apr 2003 07:39
o_O have some puffy code... o_O the bottom one is for object collision... i included some other code for it because some new people have trouble with it... codes from a tron game...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2003 13:05
Thanks for you help

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2003 13:06
Sorry!
Thanks or YOURhelp

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 27th Apr 2003 13:50
np...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!

Login to post a reply

Server time is: 2024-11-24 12:36:37
Your offset time is: 2024-11-24 12:36:37