remapping a GetKeyState() event

Non-platform specific questions.

remapping a GetKeyState() event

Postby smillz » Sat Sep 06, 2008 4:33 pm

Does anybody know a possible way to remap a key used in a GetKeyState event? for example:
Code: Select all
char*key = GetKeyState();
if(key[KEY_LEFT ] == 1)
{
    y -= 10;
}

if you just remap the left key, an event like the example in a script won't be remapped, you would still need to use the left key. Is ther a way to remap both? Help much appriciated. :wink:
smillz
 
Posts: 21
Joined: Fri Jul 20, 2007 2:10 am
Score: 0 Give a positive score

Re: remapping a GetKeyState() event

Postby Spidy » Sat Sep 06, 2008 6:03 pm

check out DST Tempelate Demo i think there is a code there
viewtopic.php?f=6&t=5833
Image
VOTE FOR MY SIGNATURE PLEASE.......THANK YOU
User avatar
Spidy
 
Posts: 935
Joined: Tue Aug 14, 2007 1:28 pm
Location: http://www.inatonibai.com
Score: 38 Give a positive score

Re: remapping a GetKeyState() event

Postby smillz » Sat Sep 06, 2008 7:40 pm

no, i don't think it's there... :(
smillz
 
Posts: 21
Joined: Fri Jul 20, 2007 2:10 am
Score: 0 Give a positive score

Re: remapping a GetKeyState() event

Postby DilloDude » Sun Sep 07, 2008 2:20 pm

You need to store the new keys in a variable when you change them, and instead of using KEY_LEFT, use your variable.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: remapping a GetKeyState() event

Postby smillz » Sun Sep 07, 2008 10:06 pm

DilloDude wrote:You need to store the new keys in a variable when you change them, and instead of using KEY_LEFT, use your variable.
I'ma try that :)
smillz
 
Posts: 21
Joined: Fri Jul 20, 2007 2:10 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron