I understand what you're trying to do and it makes sense how it works. I guess I need to know the exact command that gives you an illegal function call. Normally, commands like DRAW or LINE don't have any problems with negative coordinates, or coordinates outside of your VIEW SCREEN, but...
I'm having difficulty understanding what the problem is. It seems pretty simple since you can use negative x,y coordinates. I'm sure there's something more to it than that though.
Could you clarify your problem and toss in some examples and/or code you're working with?
Hello,
I'm looking for ANY way to play music in the background of my game, whether it be playing it in Winamp or Windows Media Player so long as QBASIC is what is telling the player which song to play and when to play it.
I've heard this can be done using libraries or the like. Unfortunately...
How are you wanting to use the grass sprite?
My recommendation would be to use data statements.
FOR Y = 1 to 5
FOR X = 1 to 5
READ GRASS%
NEXT
NEXT
DATA 1,1,1,1,1
DATA 1,1,1,1,1
DATA 1,1,1,1,1
DATA 1,1,1,1,1
DATA 1,1,1,1,1
You would have to go through the 255 colors that QBASIC offers in...
The best way to do this is to use the drawing commands that QBasic has preprogrammed and then use a variable to specify where they start from. Try something like this:
SCREEN 13
DO
DO
LINE (X%,Y%) - (X% + 100, Y% + 100),5,BF
X$ = INKEY$
LOOP UNTIL X$ <> ""
IF X$ = CHR$(0) +...
Question 1:
I'm making a 2 player game. Can someone tell me how I can make the keyboard recognize two simultaneous keys HELD down at one time?
For example, let's say I have two counters, one that displays how many times the "F" key has been pressed and another counter displaying how...
Another thing about this. This program I've made works find on my computer, but when my friend uses it on his, it works fine too, but once it gets to a certain point, it crashes and says, "OUT OF MEMORY" Usually this is due to the program being to big, but if that were so, wouldn't...
I have a program that I've written that uses lots and lots of variables. There are literally hundreds of them. How do I get rid of them while the program is running so that I can free up the space and not run out of memory? I know that with arrays there is the ERASE command but it doesn't...
I have QB4.5 and many programs I write can be compiled but others cannot. I have a game that I've made (that's about 200 KB) and the game works fine and runs (and is pretty cool) but when I try to compile, I get about 40 or 50 errors and just as many warnings. Does anyone have any idea why a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.