Remap Key Question

Non-platform specific questions.

Remap Key Question

Postby plinydogg » Sat Feb 04, 2006 5:43 pm

I can't seem to figure out how to properly use the remapKey() function. Can anyone help?

Here's what I am currently doing (which isn't working):

(1) User presses "remap keys" on the main menu and the view moves to a separate remapping screen;

(2) The user is told to press the key that he or she wants to perform the listed function (for example, when the word "main gun" is displayed, the user is supposed to press the button he/she wants to use to fire the main gun, etc.);

(3) The user then presses a button that says "remap" and the following code is executed:

remapKey(getLastKey(), KEY_POCKET_C);

(4) The user hits the return button to return to the main screen.

I can't figure out why this doesn't work. Is it because I have to use a keydown event? If so, what actor should I put it on?

Thanks in advance for the help.

Plinydogg
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby Novice » Sat Feb 04, 2006 6:28 pm

I think that remapKey(); function doesent work with PPC, sombodey correct me if im wrong.
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

Re: Remap Key Question

Postby makslane » Sat Feb 04, 2006 9:27 pm

plinydogg wrote:The user then presses a button that says "remap" and the following code is executed:

remapKey(getLastKey(), KEY_POCKET_C);


The pocket pc keys are special keys (you don't have a pocket pc key in your keyboard!).
So, you need assign a usal PC key to the pocket pc key in the Game Properties panel.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby makslane » Sat Feb 04, 2006 9:28 pm

Novice wrote:I think that remapKey(); function doesent work with PPC, sombodey correct me if im wrong.


The remapKey() function works on Pocket PC too!
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby plinydogg » Sat Feb 04, 2006 10:02 pm

Thanks for the replies.

Sorry to be dense, but when you say that I "need assign a usal PC key to the pocket pc key in the Game Properties panel," what do you mean exactly?

Do you mean that I need to, for example, remap POCKET_KEY_C to, say, KEY_RCTRL in the Game Properties panel and then use the remapKey() function?

Thanks again for the help!
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby Novice » Sat Feb 04, 2006 10:24 pm

If you want to test on your PC yes, for the exporeted game use whatever you are using now.
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

Postby plinydogg » Sat Feb 04, 2006 10:54 pm

But if that's true, then why don't the steps I outlined in the original post work properly?
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby makslane » Sun Feb 05, 2006 12:41 am

plinydogg wrote:Do you mean that I need to, for example, remap POCKET_KEY_C to, say, KEY_RCTRL in the Game Properties panel and then use the remapKey() function?


Use the configuration in Game Properties to map a pocket pc key to a valid key in your PC keyboard. Note, when you use the Key Down/Up event, you can only use PC keys.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby plinydogg » Tue Feb 07, 2006 4:17 pm

Alright...I've tried everything I can think of to implement key remapping in my PPC game without success. The whole purpose of doing this is because a betatester reported that a couple of the keys did not perform their intended function on his/her device. To fix this, I wanted to allow the user to remap the keys so that it would work on all PPC devices.

I'm sure that someone has implemented this before in some game. If so, I would REALLY appreciate it if you would post a brief explanation of how you went about doing so. Alternatively, you can e-mail me at plinydogg@aol.com.

Thanks.
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby mrdark7734 » Wed Feb 08, 2006 2:56 am

I made a demo about this very subject after I ran into the problem while making "A Bloody Mess"
I'll post the GE files as soon as I get a chance, unfortunatly that won't be until this weekend as I'm not able to get at my normal computer.
The demo has the ability to remap every button available to GE for pocket pc as well as save the configuration to a file, and it does it very reliably.
If you want to see it in action download the demo for "A Bloody Mess"
I'll try and post the GE files saturday if I can.
User avatar
mrdark7734
 
Posts: 21
Joined: Thu Aug 25, 2005 12:49 am
Location: Texas (where we're crazy enough to shoot a president)
Score: 0 Give a positive score

Postby plinydogg » Wed Feb 08, 2006 4:57 pm

Thank you mrdark7734! I would really appreciate it! And I'm sure that others will find it useful as well.
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby Mardi-Gras » Wed Feb 08, 2006 5:53 pm

A second vote of appreciation from me - I'd also find that of interest. My blood ran slightly cold when reading Plinydogg's original post, as remapping wasn't a difficulty I'd anticipated, but I can see how it could cause problems. Hope you can find the time to post your tutorial, and many thanks in advance. As Plinydogg said, I think alot of people'd find it useful.
User avatar
Mardi-Gras
 
Posts: 57
Joined: Sun Jan 22, 2006 10:10 pm
Location: Glenrothes, Scotland
Score: 0 Give a positive score

Postby plinydogg » Thu Feb 09, 2006 1:12 am

mrdark7734,

Two things: (1) I downloaded the demo to "A Bloody Mess" from Handango but wasn't able to find an option that allows the user to reconfigure buttons: and (2) The game is REALLY FUN AND ADDICTIVE!!! Nice work!

Plinydogg
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby mrdark7734 » Thu Feb 09, 2006 3:18 am

Sorry about that, the configuration screen is available in the VGA version of the demo only (I forgot I had two versions. If my head wasn't stapled on I'd loose it)

And thank you for the compliment.
User avatar
mrdark7734
 
Posts: 21
Joined: Thu Aug 25, 2005 12:49 am
Location: Texas (where we're crazy enough to shoot a president)
Score: 0 Give a positive score

Postby plinydogg » Thu Feb 09, 2006 10:42 pm

mrdark7734:

While waiting on your button remap demo, I wrote a review of A Bloody Mess.....check it out:

http://ppcgems.blogspot.com/
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron