hey all, im making a simple game where you pickup and throw a ball or something along those lines, but my problem is for some reason when you try to thowr the baal diagonall down the the right and left or diagonally up to the left the ball doesnt fire. however when you aim up and right it does. Any ideas? if you dont know what i mean try out the code below and try firing in all 8 directions.
thanks in advance
x=200
y=200
poss=1
do
cls
if upkey()=1 and rightkey() = 0 and leftkey()=0 then y=y-1 : diry=-1 : dirx=0
if downkey()=1 and rightkey() = 0 and leftkey()=0 then y=y+1 : diry=1 : dirx=0
if rightkey()=1 and upkey() = 0 and downkey()=0 then x=x+1 : dirx=1 : diry=0
if leftkey()=1 and upkey() = 0 and downkey()=0 then x=x-1 : dirx=-1 : diry=0
if upkey()=1 and rightkey() = 1 and leftkey()=0 then y=y-1 : x=x+1 : diry=-1 : dirx=1
if downkey()=1 and rightkey() = 1 and leftkey()=0 then y=y+1 : x=x+1 : diry=1 : dirx=1
if upkey()=1 and rightkey() = 0 and leftkey()= 1 then y=y-1 : x=x-1 : diry=-1: dirx=-1
if downkey()=1 and rightkey() = 0 and leftkey()= 1 then y=y+1 : x=x-1 : diry=1 : dirx=-1
if spacekey()=1
if poss=1
shoot=1
poss=0
endif
endif
if poss = 0
if x+10 > bx-5 and x-10 <bx+5 and y+10 > by-5 and y-10 <by+5
if shoot=0
poss=1
endif
endif
endif
circle x,y,10
if poss=1
bx=x+(dirx*10)
by=y+(diry*10)
tx = x+(dirx*80)
ty = y+(diry*80)
circle tx,ty,2
endif
circle bx,by,5
if shoot=1
circle tx,ty,2
if by< ty then by=by+2
if bx> tx then bx=bx-2
if by> ty then by=by-2
if bx< tx then bx=bx+2
endif
if bx=tx and by=ty then shoot = 0
set cursor 0,0
print poss
sync
loop
Formely Blank as a plank