Search found 4 matches

by DrNick13
Wed Jun 16, 2010 5:41 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Can't get inkey$ to work (sometimes)
Replies: 6
Views: 10604

Thanks! :D
by DrNick13
Wed Jun 16, 2010 4:35 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Can't get inkey$ to work (sometimes)
Replies: 6
Views: 10604

Woops... originally i used 1 for movement (just a box around the screen to test it) and realized it was too slow. I do use TYPEs for the values: TYPE StandardSprite X AS INTEGER Y AS INTEGER OldX AS INTEGER OldY AS INTEGER END TYPE For moving the sprite, I just PUT it using those co-ordinates: PUT (...
by DrNick13
Wed Jun 16, 2010 2:12 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Can't get inkey$ to work (sometimes)
Replies: 6
Views: 10604

Those two locations are the only places where i use INKEY$

Except for

Code: Select all

UserInput$ = ""
UserInput$ = INKEY$
which I use at the beginning of the loop
by DrNick13
Tue Jun 15, 2010 8:12 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Can't get inkey$ to work (sometimes)
Replies: 6
Views: 10604

Can't get inkey$ to work (sometimes)

I have a problem getting input for my game. I use IF (UserInput$ = "o") AND (Player1.Y > 1) AND (Get1Input = 1) THEN ' Move P1 up Player1.Y = Player1.Y - 2 Get1Input = 0 ELSEIF (INKEY$ = "l") AND (Player1.Y < 175) AND (Get1Input = 1) THEN ' Move P1 down Player1.Y = Player1.Y + 2 ...