Moving at same time? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: Moving at same time? (/thread-601.html) |
Moving at same time? - whitetiger0990 - 04-08-2003 I have a program with two paddles... You push "z" and one goes down You push "m" and the other goes down But how do you make it so you can push both "z" and "m" at the same time and both paddles move at the same time? Code: CLS I know it's kind of messy and all but... can you not make comments... Please just tell me how to push the buttons at the same time and have the paddles move at the same time?[/quote] Moving at same time? - na_th_an - 04-08-2003 You need a keyboard handler. The default one which is provided by MSDOS just doesn't support more than a key at the same time, so you have to replace it by yours. They are usually short assembly programs embedded in a nice SUB, just like Milo Sedlacek's. Make a google search for it, but I'm quite sure someone will come with a useful link or just a code post (I don't have it). When you have it and find problems, feel free to ask us for some tips. Moving at same time? - whitetiger0990 - 04-08-2003 That doesn't really help... Sry try this - Meg - 04-08-2003 Look at ON KEY in QB help. I believe you can set up to 5 keys, and can both check to see if the key is initially pressed or help down. That may help you. *peace* Meg. Moving at same time? - Kofman - 04-28-2003 Wow that helped me, I don't know why I opened this thread up but it will become useful in my fighting game. Both the keyboard handler, and the ON KEY thing. Moving at same time? - Hexadecimal Disaster - 04-28-2003 Custom keyboard handle = good. ON KEY = bad. Keep in mind that little comment, Kofman. Moving at same time? - Kofman - 04-28-2003 thank you Moving at same time? - relsoft - 04-28-2003 BIG words, NO code. :*) Moving at same time? - Hexadecimal Disaster - 04-29-2003 So you want code? http://forum.qbasicnews.com/viewtopic.php?t=2223&start=7 One of the best available, courtesy of the legend. 8) |