Robuck
Experienced Member
Hello
I have been working a lot with qbasic on my 486 PC, and I am trying to make a roguelike game as practice. I can do most of the other stuff I need to code for the game, but my biggest problem right now is user input. Basically, I need there to be a way where you can press a key, and it will immediately return a variable and move on to the next portion of code. When I was doing some extremely simple batch coding, I would use the choice command, which works exactly the way i need it to in this situation. I have tried line input commands, but you have to press enter every time you put in the input. I have tried keydown commands, but I do not favor these because sometimes it's unresponsive, and you have to cycle through a portion of code over and over.
I would be greatly appreciative if someone told me the command im looking for, and a short example would be even better!
Thank you,
Mark Robuck
I have been working a lot with qbasic on my 486 PC, and I am trying to make a roguelike game as practice. I can do most of the other stuff I need to code for the game, but my biggest problem right now is user input. Basically, I need there to be a way where you can press a key, and it will immediately return a variable and move on to the next portion of code. When I was doing some extremely simple batch coding, I would use the choice command, which works exactly the way i need it to in this situation. I have tried line input commands, but you have to press enter every time you put in the input. I have tried keydown commands, but I do not favor these because sometimes it's unresponsive, and you have to cycle through a portion of code over and over.
I would be greatly appreciative if someone told me the command im looking for, and a short example would be even better!
Thank you,
Mark Robuck