Right. O.K. I think I've sorted it out pretty much. You see, the thing is that I don't know how to make the bullet move in a few lines of code, so instead, I have to do this:
rem this is the part of the code that fires a bullet.
fire:
if spacekey()=1
play music 5
sync rate 0
show sprite 8
sprite 8, x+289, y+282, 8
sync
hide sprite 8
sprite 7, x+295, y+240, 7
sync
sprite 7, x+295, y+180, 7
sync
sprite 7, x+295, y+120, 7
sync
sprite 7, x+295, y+60, 7
sync
sprite 7, x+295, y+0, 7
sync
sprite 7, x+295, y-60, 7
sync
sprite 7, x+295, y-120, 7
sync
sprite 7, x+295, y-180, 7
sync off
But this means that the computer has to go through all of these commands before it can get to the commands that allow movement. Therefore, I changed it to this:
rem fire bullet
fire:
if spacekey()=1
play music 5
sync rate 0
show sprite 8
if upkey()=1 then gosub control
sprite 8, x+289, y+282, 8
sync
hide sprite 8
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sprite 7, x+295, y+240, 7
sync
if 0 > sprite y(7) then gosub control
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sprite 7, x+295, y+180, 7
sync
if 0 > sprite y(7) then gosub control
if downkey()=1 then gosub control
sprite 7, x+295, y+120, 7
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sync
if 0 > sprite y(7) then gosub control
if downkey()=1 then gosub control
sprite 7, x+295, y+60, 7
if upkey()=1 then gosub control
sync
if 0 > sprite y(7) then gosub control
sprite 7, x+295, y+0, 7
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sync
if 0 > sprite y(7) then gosub control
sprite 7, x+295, y-60, 7
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sync
if 0 > sprite y(7) then gosub control
sprite 7, x+295, y-120, 7
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sync
if 0 > sprite y(7) then gosub control
sprite 7, x+295, y-180, 7
if upkey()=1 then gosub control
if downkey()=1 then gosub control
sync off
load music "C:\Program Files\Microsoft Games\Age of Empires II\Sound\scenario\wolfcastle2_disparo1.mp3", 5
endif
Which allows movement up and down. Thanks for everyone's help on this.