Qbasicnews.com
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)

Pages: 1 2 3 4 5 6 7 8 9


Chaser - meritmonster - 05-04-2002

Ok so here goes...
You know that INKEY$ can only hold 1 value, the current key being pressed. MULTIKEY is used to get all the keys being pressed at that moment. First you will need to download the file ->
You must then start QBASIC with the QB quicklibrary (/l parameter) because it uses call absoulute.
This is an improved version of MULTIKEY by Milo Sedlacek, modified by Joe Huber
The file is actually a game that uses multikey, and explains MULTIKEY as a comment at the top of the file.
To use MULTIKEY, you will have to copy the 2 subs (included in the MULTIKEY file) into your programme (or 'program' if you live in the US). You are then ready to use multikey. (Instead of copying the subs, you might want to compile them into a single library and just include that instead.)
I will not explain how to use MULTIKEY and KEYTEST here, because all is explained in the .bas file.
It is very similar to INKEY$ for example rather than:
IF INKEY$ = CHR$(27) THEN...
you would use
IF MULTIKEY(1) THEN...
[MULTIKEY(1) = CHR$(27) = escape]
-------------------
hope this helps,
meritmonster :-D


Multikey - Oinkerwinkle - 05-04-2002

Thanks. Big Grin

Where can I download the file? I tried searching on Yahoo and found lots of Milo Sedlacek-made things but no Multikey Program.


Chaser - meritmonster - 05-04-2002

SORRY!!!!!!!!!!!
I was going to put a link to the file, I thought I'd do It when I'd finished typing, but I forgot!
OK here is the file -> http://ndga.tripod.com/multikey.bas


Thanks - Oinkerwinkle - 05-04-2002

Thanks again! I'll try to understand that. Is it suppost to all be on one line? I'm having trouble figuring out where the next lines begin in some parts.

Also, I made a web site: www.angelfire.com/co4/chaser/home.html


Chaser - meritmonster - 05-04-2002

I dont understand...what is all on one line?

Big Grin Smile


The Multikey is! - Oinkerwinkle - 05-05-2002

The Multikey program is all in one big line, and I don't know where to press enter. Click your link to see. The line is about 1000 characters long.


Chaser - chunky soup - 05-05-2002

I just looked at you site and found the old Chaser games. Wow, you have made a lot of progress since the older ones.


Chaser - meritmonster - 05-05-2002

I have uploaded my MULTIKEY file onto my tripod account, this one seems to work for me: http://meritmonster.tripod.com/multikey.bas


Gak! - Oinkerwinkle - 05-05-2002

Gak! I bring that into Qbasic, and it turns into one line several thousand characters long.
- Cry -

O well...


Chaser - meritmonster - 05-05-2002

Try searching the internet for it, I found it originally by searching google for "QBASIC MULTIKEY".
What version of Qbasic do you use anyway?