Qbasicnews.com

Full Version: Hmm, arrow keys are different in FB that in QB.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am sorry for asking this, it is most likely the no0biest question i will EVER ask but, in fb the arrow keys work differently. I was told to do them as

Code:
IF press$ = CHR$(0) + CHR$(75) AND x2 > 1 THEN x2 = x2 - pspeed
IF press$ = CHR$(0) + CHR$(77) AND x2 < 290 THEN x2 = x2 + pspeed
'this is a direct clip from a pong like game i made in QB and have reloaded in FB
but in fb that doesn't work (it does in qb). How do i get the arrow keys to work in fb?
This is just a quick snip I'm using in a game I havent been working on.

CASE chr$(255) + chr$(72)
GOUP
CASE chr$(255) + chr$(80)
GODOWN
CASE chr$(255) + chr$(75)
GOLEFT
CASE chr$(255) + chr$(77)
GORIGHT

kthx bye
ahh, i see now, instead of CHR$ (0) you use CHR$(255). Thanks, i knew the qb but never heard anyone mention it was different in fb. Someone really needs to make some FB tutorials, and i mean basic ones so newbies don't need to look for 2 different tutorials and don't need to burn there brain cells processing the differences
Yeah, tutorials or a more complete manual would be great, the inkey$ difference is listed though: http://www.freebasic.net/about.php?section=faq#7