Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inkey$ help
#7
Im not the smartest QB guy around but I think I can offer you a solution that is very quick. If the user taps both the up and right keys it almost appears they are moving diagonal! That is good! But it would present collision problems right? Because in all reality there just going up and over. So just make them more one or 2 pixels at a time that way the program is not to complex and the person just has to get better with there reflexes... just a thought.

And also dump the INKEY$ shit off at the next truck-stop. And at the BEGINING of every keypress loop add this:

Quote:press$ = INKEY$

It may look odd and pointless but let me assure you it will capture the keys much better... What it dose is everytime the program hits that point it changes your keypress (INKEY$) to press$ and for somereason it helps... I cannot explain it but it works.

Just to understand it run these 2 sample programs.

Quote:CLS
PRINT "Press 1 to have me say 'Yipee!!' or press 2"
PRINT "too have me say 'Bye Bye loser' ."
DO
IF INKEY$ = "1" THEN PRINT "Yipee!!": END
IF INKEY$ = "2" THEN PRINT "Bye Bye loser": END
LOOP

Stupid program, but uses keys... run it a few times and you will see sometimes you have to press 1 or 2 more than once to get the desired effect. Now run this.

Quote:CLS
PRINT "Press 1 to have me say 'Yipee!!' or press 2"
PRINT "too have me say 'Bye Bye loser' ."
DO
press$ = INKEY$
IF INKEY$ = "1" THEN PRINT "Yipee!!": END
IF INKEY$ = "2" THEN PRINT "Bye Bye loser": END
LOOP

I'm sure you will be pleased!
ey! Visit my sites:
www.angelfire.com\ex\ariesqbasic
www.ariesdomain.tk
Reply


Messages In This Thread
Inkey$ help - by BillBrasky - 06-06-2003, 04:32 AM
Inkey$ help - by seph - 06-06-2003, 04:34 AM
moving things - by Mango - 06-06-2003, 04:40 AM
Inkey$ help - by Ninkazu - 06-06-2003, 04:47 AM
Inkey$ help - by Agamemnus - 06-06-2003, 04:55 AM
Inkey$ help - by Mango - 06-06-2003, 05:07 AM
Im not... - by Aries - 07-14-2003, 02:45 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)