In one of my VbB games the missiles are shooting to the right side of the screen.
Code:
Quote
rem Generated 2/13/2011 6:17:27 PM by Visual bB Version 1.0.0.554
rem **********************************
rem *<filename> *
rem *<description> *
rem *<author> *
rem *<contact info> *
rem *<license> *
rem **********************************
playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
COLUBK = $7A
COLUPF = 84
player0x=50:player0y=50
player1x=20:player1y=20
missile0height=4:missile0y=255
NUSIZ0 = 16
sprites
player0:
100100
%10011001
%01111110
011000
111100
100100
100100
111100
end
player1:
000000
111100
%01111110
%01100110
%01100110
%01111110
111100
000000
end
if missile0x>240 then goto skip
missile0y=missile0y-2: goto draw_loop
skip
if joy0fire then missile0y = player0y-2:missile0y=player0x+4
draw_loop
drawscreen
goto sprites
rem **********************************
rem *<filename> *
rem *<description> *
rem *<author> *
rem *<contact info> *
rem *<license> *
rem **********************************
playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
COLUBK = $7A
COLUPF = 84
player0x=50:player0y=50
player1x=20:player1y=20
missile0height=4:missile0y=255
NUSIZ0 = 16
sprites
player0:
100100
%10011001
%01111110
011000
111100
100100
100100
111100
end
player1:
000000
111100
%01111110
%01100110
%01100110
%01111110
111100
000000
end
if missile0x>240 then goto skip
missile0y=missile0y-2: goto draw_loop
skip
if joy0fire then missile0y = player0y-2:missile0y=player0x+4
draw_loop
drawscreen
goto sprites
Got any ideas?
I have been using gigafide's Youtube tutorial.
Edit: Ignore the indenting, the forum did that.
Edited by gHan2000, Thu Feb 17, 2011 3:33 PM.














