void remapKey(int fromKey, int toKey)?

Talk about making games.

void remapKey(int fromKey, int toKey)?

Postby ingsan » Wed Nov 26, 2003 8:43 am

can anyone make me a little tut on this? :oops:
Thanx guys...
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Wed Nov 26, 2003 1:19 pm

Use this function to redirect any keys.

In your game, actor shot with KEY_RCTRL.
Your user can change this in a configuration screen:

In a KeyDown event, put this:

remapKey(getLastKey(), KEY_CTRL);

Now, the key pressed by user, will be redirected to KEY_CTRL, so you don't need to change your defaults game keys.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

ingsan

Postby ingsan » Mon Dec 01, 2003 1:02 pm

8)
Cool...ThanX Maxslane! :D
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

??

Postby ingsan » Mon Dec 01, 2003 1:09 pm

Well i'm thinking,maxslane,do u remember this jump and Climb problem?
So,With this method,would i be able to remap another "action" on my KEY_UP?
ex first Up_Key is y=y+40;
second Up_Key becomes yvelocity=-4;

T_Ank u... :?:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Mon Dec 01, 2003 10:24 pm

No, but you can put a var to count your key ups
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Thu Dec 04, 2003 3:17 pm

ok
Thank u... 8)
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest