how do you let people select what button does what?

Talk about making games.

how do you let people select what button does what?

Postby Kooldudese » Wed Aug 22, 2007 4:44 pm

how do you make it so that theyre is a place where you can select what button you want to press to make that happen aka. in the options thery is the
"controls"
of which in it it looks like
left=leftarrow "change key"
up=uparrow "change key"
down=downarrow "change key"
right=rightarrow "change key"
atk=spacebar "change key"
(and so on)
and when you press change key, it says"press the key to replace it"
plz help
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Astro Lemur » Wed Aug 22, 2007 7:19 pm

Theres a function called 'remapKey'.

Theres two ways i know of to do it.

Number one is key to specific key, like changing '1' to '2':

remapKey(KEY_1, KEY_2);

Number two is key to last key pressed, which is:

remapKey(KEY_PAD_ENTER, getLastKey();

You could use number one with a key menu or use number two.
User avatar
Astro Lemur
 
Posts: 12
Joined: Sun Mar 25, 2007 4:05 pm
Location: Port Townsend, WA
Score: 1 Give a positive score

Postby Kooldudese » Thu Aug 23, 2007 12:58 pm

plz explain more detailedly how it would work...
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Oman » Thu Aug 23, 2007 4:05 pm

I will make a demo :)

Edit: or not.... i cant get your way to work astro lemur :(
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby Kooldudese » Fri Aug 24, 2007 6:33 pm

plz make a demo, but im not saying you must use his way
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Oman » Fri Aug 24, 2007 6:37 pm

i thought i could use his way... but i cant figure it out... i dont no any other way :(
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Re: how do you let people select what button does what?

Postby Astro Lemur » Thu Sep 06, 2007 4:20 am

Sorry, been away for awhile. Honestly, im not sure exactly how to use them, i just looked up the functions in the script editor and guessed what they did. I'll try to make a demo right now.
User avatar
Astro Lemur
 
Posts: 12
Joined: Sun Mar 25, 2007 4:05 pm
Location: Port Townsend, WA
Score: 1 Give a positive score

Re: how do you let people select what button does what?

Postby Astro Lemur » Thu Sep 06, 2007 4:34 am

I've try both ways, and i havnt gotten it to work... sorry 'bout that.
User avatar
Astro Lemur
 
Posts: 12
Joined: Sun Mar 25, 2007 4:05 pm
Location: Port Townsend, WA
Score: 1 Give a positive score

Re: how do you let people select what button does what?

Postby Sondise » Tue Nov 27, 2007 8:17 pm

Send a message to this e-mail: support@game-editor.com
:wink:
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron