Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / problem with GetRawlastkey( )

Author
Message
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Sep 2015 03:43 Edited at: 23rd Sep 2015 03:48
the problem is its delayed about a frame or so. when i call the command it potentially gives me the value key pressed 1 key back or so when i know another had been pressed.

can we get a new command like...

getrawcurrentkey() or latest key... ?? or we need the lastkey to actually report more accuratly.

The main problem i have is in my menu system i am allowing the user to change the keyboard layout. In my main loop it waiting for a key to be pressed and then sets it for that function.

i pulled this little code chunk from my game to show what i mean.





i know of the problem inside there if you press the same key as last time it doesnt catch it... so please dont point that out...lol its just a case of removing this(newkey<>getkey )

the problem is that when it jumps out of the loop its not always the last key pressed... it usually take 2 to 3 times for it to report the correct key i pressed.

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Sep 2015 04:01 Edited at: 23rd Sep 2015 04:02
ok... not soo much a hi priority anymore....

this work around has a few more frames to pass before capturing the final key value



www.sheldonscreations.com

Login to post a reply

Server time is: 2024-11-16 22:06:03
Your offset time is: 2024-11-16 22:06:03