Chaser - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Projects (http://qbasicnews.com/newforum/forum-12.html) +--- Thread: Chaser (/thread-3.html) |
Chaser - meritmonster - 05-05-2002 I know, I'll make a library with it, (might not work), and include the instruction as a txt file. Yay! - Oinkerwinkle - 05-05-2002 I finally got it. I had to go Save Target As instead of copying it into notepad and saving as bas. Sorry for taking so much of your time. And I use version 1.1. So, to use multikey, do you just go IF MULTIKEY(1) "q" THEN END Chaser - meritmonster - 05-05-2002 no, MULTIKEY(1)"q" wont work, the number in the parenthesis is the scancode [NOT THE SAME AS INKEY$ SCANCODES] for example MULTIKEY(1) is escape MULTIKEY(2) is number 1 on the keyboard MULTIKEY(3) is number 2 on the keyboard MULTIKEY(16) is letter 'q' MULTIKEY(28) is enter etc To test for the key number (ie MULTIKEY(keynumber)) use KEYTEST it should then give you a little table, press the keys you want, and you should see a '1' next to a number, that number is the scan code if you press 2 keys (or more) at once, several numbers should 'turn on' Most of this is explained in the top of the bas file. one other thing: TO USE MULTIKEY YOU MUST TURN IT ON BY CALLING int = MULTIKEY(-1) 'I use the variable int for initializeing functions because where else are you going to use a variable called 'int'? ANOTHER THING, BEFORE YOUR PROGRAM ENDS YOU MUST CALL int = MULTIKEY(-2) to turn your keyboard handler back to normal, or your keyboard will not work ----------- meritmonster Chaser - meritmonster - 05-05-2002 ENTER is actually 28, it just replaced (28 ) with a smiley Chaser - meritmonster - 05-05-2002 How did you compile chaser with 1.1? Did you use one of those third party compilers? Youll need 4.5, (I think), to use MULTIKEY, becuse it uses CALL ABSOLUTE, and needs the QB quicklibrary. It might work on 1.1, try it and see. Thanks - Oinkerwinkle - 05-05-2002 Thanks for the explanation. If I forget to turn Multikey off, will having to restart to computer be the only consequence? What if I control-break mid-program? Anyway, about your compiler question, I program in 1.1 then compile in 7.1. 1.1 seems to run in a speed more similar to an EXE. I got MULTIKEY in, and it works very well! Thanks again! I have a problem though (suprise, suprise): The down arrow returns 1's for 42 and 80. The 2(down) on the number pad returns 80. So, when I press the down arrow, it controls two people. I tried if 80 is triggered and 42 is not triggered, but then pressing the arrow renders the number pad user immobile. Gak! Should I move the arrow user to letters? Chaser - BlueKeyboard - 05-05-2002 You could use W, A, S, D. W would be up, S would be down, D would be right and A would be left. Chaser - Zmisk - 05-05-2002 WASD is already used, why not IJKL or something like that? New Controls - Oinkerwinkle - 05-05-2002 I added the new controls in. For 1 and 2 player games, the arrows still work. For a three player game, i, j, m, and l and the conrtols. 8) Guess what! I have another problem! I tried to compile, and got Program-Memory Overflow. What does it mean? :-? Program Memory Overflow - Oinkerwinkle - 05-05-2002 Nevermind, I fixed it. Apparently, it means that the program is too long. Is there any way around the length limit? |