My code currently does not launch a missile, it launches the player and changes the sprite color.
Can anyone help?
set kernel_options playercolors player1colors pfcolors set kernel_options pfcolors e=0 : rem counter for firing gun c=50 : rem player0 x position d=50 : rem player0 y position dim fire=e dim p0y=d dim p0x=c x=50 y=50 main COLUBK=02 player0y=y player0x=x pfcolors: $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 end playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X............................... X............................... X............................... X............................... X............................... X............................... X............................... X............................... X............................... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end player0color: $00 $40 $40 $40 $40 $40 $40 $20 $00 $00 end player0: %00111000 %00110000 %00110000 %01111000 %01111000 %01111000 %00110000 %00111000 %01111100 %00111000 end if x>140 || missile0x>140 then missile0y=11 if !joy0fire then fire=0 : x=p0x : missile0x=0 : missile0y=0 if joy0fire then missile0x=x+8:missile0y=p0y-y-6 if fire<60 && missile0x>135 then missile0y=0 if fire<60 then x=x+2 else missile0y=0 if fire>250 then fire=25 fire=fire+1 rem write data to the screen drawscreen rem joystick movements if joy0right then x=x+1 if joy0left then x=x-1 if joy0up then y=y-1 if joy0down then y=y+1 rem loops game goto main
Edited by endrien, Fri Aug 20, 2010 9:48 PM.














