The Daily Click ::. Forums ::. Klik Coding Help ::. How do I let the player config his or her own keys ? < MMF 1.5 >
 

Post Reply  Post Oekaki 
 

Posted By Message

Test_Tube_Games



Registered
  29/03/2004
Points
  45
8th April, 2004 at 15:42:10 -

Ok I have a small problem, I have set some keys for a game I am making.

Arrow keys to move and then different keys for different weapons. Now that all works fine, but some feedback I have had is that the players would like to config their own weapon keys, and since I am a complete newbie at this, I have no idea how to.

so if anyone could help me out that would be great!

thanks in advance



 
Be gentle I am a complete newbie!

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
8th April, 2004 at 16:47:53 -

If you are using a built-in movement, just press Control-Y during the game and you'll get a config screen.

 
gone fishin'

Test_Tube_Games



Registered
  29/03/2004
Points
  45
8th April, 2004 at 19:01:23 -

no thats didnt work, I have 4 different weapon shots < may end up 5 >. and just left and right movement.

They must be away I can have a change control screen made, where the player can pick what keys he/she wishes to use. Really need to get this to work, been the most requested thing from my beta testers < they didnt like my default keys >.

thanks again.





 
Be gentle I am a complete newbie!

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
8th April, 2004 at 19:39:35 -

you could use the control x object. i've never personally used it but i've heard it can be buggy, all the same you could give it a try. i've uploaded it for you here:

http://www.create-games.com/uploads/ctrlx.cox

place that file in the "C:\MMFusion\Programs\Extensions" and "C:\MMFusion\Programs\Data\Runtime" folders, start MMF and insert the ControlX object into your "edit controls" level, and add a few edit boxes. select the actions like "Player > Set up" from the control x object. when it says "enter the key as a string", click "Retrieve data from an object", select the applicable edit box and click "get text". so if "a" has been typed into the edit box, then "a" should be set as the new key for "up". as you only have left and right directions, you have the rest of the keys available for the weapon slots . you don't have to use "up" as a key for "up", it could be "select weapon #2". hope this helps.

p.s. if you use the "Set Up(value)" type action then that takes the ascii value of the key rather than the string it represents.

Image Edited by the Author.

 
www.thenatflap.co.uk

Test_Tube_Games



Registered
  29/03/2004
Points
  45
9th April, 2004 at 07:06:52 -

hmm "website not found"

is this the correct web address? "http://www.create-games.com/uploads/ctrlx.cox "

Also dont like the sound of it being abit buggy, is there any other way to do this?

the arrow keys are fine, just people want to set the weapon keys, failing that what would be a good set of keys to set for the weapons?

now the player has to fire the correct weapon type to hit the matching object < dont want to give too much away until i release this game as a demo, so sorry for being vague > so he would be using each key quite abit and switching from key to key very fast.

i had them set up as 1, 2, 3, space bar as weapon keys, left / right arrows as movement. but i have quite large hands and found it easy to have all the buttons covered with my fingers, but some of my play testers said it was a pain with that set up, but they also cant agree with what set up would be best!

< bangs head off desk many times >

 
Be gentle I am a complete newbie!

danjo



Registered
  15/01/2002
Points
  641

Acoders MemberGOTM NOVEMBER - 2009 - 3RD PLACEI am an April FoolVIP Member
9th April, 2004 at 07:56:22 -

CONTROL X works perfectly. i use it all the time for that exact reason of user defined keys.
you must remember the key settings - so store them in array/global or what ever you like.
you must make a part where the user defines the key, as in selects left - awaits a keystroke, use CONTROL X to "listen" for the keystroke - and store it.
then in the gameplay you compare the CONTROLX key pressed to (store value) for left - and it move left as if you just wrote a user presses left.
its very simple and effective, and looks a damn side better than the control-Y windows method.

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
9th April, 2004 at 11:48:28 -

ah right, cool, glad to know it works

impact - here's the file again: http://www.create-games.com/uploads/ctrlx.zip (i've zipped it up this time)

 
www.thenatflap.co.uk

Test_Tube_Games



Registered
  29/03/2004
Points
  45
9th April, 2004 at 14:27:49 -

thanks for the file.

I must admit I am having a hard tme with this, would anyone beable to show me an example of this working?

thanks again for helping this newbie out

 
Be gentle I am a complete newbie!

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
9th April, 2004 at 17:35:08 -

try this

http://www.create-games.com/uploads/ctrlxeg.zip

 
www.thenatflap.co.uk

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
9th April, 2004 at 19:49:11 -

Random transvestisism comment there.

 
Image
   

Post Reply



 



Advertisement

Worth A Click