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.

DarkBASIC Professional Discussion / need help for character selection menu

Author
Message
miss shasha
14
Years of Service
User Offline
Joined: 29th Sep 2011
Location:
Posted: 14th Oct 2011 22:59
hi. does any body have an idea on how to implement a character selection menu? i have 4 characters in my game and i need a character selection menu but i don't have idea on how to make one. please help me, i need some examples on how to do this.

Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 14th Oct 2011 23:43
Well, that depends... how do you want to select your characters? Through a picture menu or a text menu?

A text menu is one where you use a text prompt to select a number for the character you want.

Similar looking to this:



A picture menu is where you use the arrow keys to select a picture of the person.

What you'd do in that case is draw the four images on the screen, and then draw a box around an image to "highlight" it. That's your cursor of sorts, and when the person hits the arrow keys left or right, it will move the cursor over accordingly, and if you hit ENTER or another key to select the character, then that's the character you use.

Sorry if I'm being too general.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Oct 2011 23:44
Make 4 picture of your characters. If each picture is a square, or rectangle it has a zone. top x, top y, bottom x, bottom y. Clicking inside that zone...

if zoneclicked(280,15,431,66)=1
character = 1
endif



function ZoneClicked(X1,Y1,X2,Y2)
J=0:X=mousex():Y=mousey()
if X>=X1 and X<=X2 and Y>=Y1 and Y<=Y2 then J=1
endfunction J

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 15th Oct 2011 00:49 Edited at: 15th Oct 2011 00:59
Hi there. Here's an easy way to do that.




Cheers.

I'm not a grumpy grandpa
miss shasha
14
Years of Service
User Offline
Joined: 29th Sep 2011
Location:
Posted: 15th Oct 2011 19:30
thank you for the response!

@da_rhyno: thanks for the reply. its ok i actually want to make a picture menu. thanks for your idea, i will try it. how about when i select the character and press enter or return key. will i use gosub or goto for my chosen character to appear on my first stage?

@pincho paxton: ok. thank you i will try it

@chafari: thanks!

thank you all! such a big help for my problem. highly appreciated! God bless

Daniel wright 2311
User Banned
Posted: 15th Oct 2011 23:04 Edited at: 15th Oct 2011 23:04
Or you coulld say something like this



then just dissplay pictures of each model to click on,if you click on picture three then it will be carselect1=3,its that simple realy my good friend.

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-10 09:57:20
Your offset time is: 2026-07-10 09:57:20