Talk:Codename Shooter/@comment-54.189.57.65-20150525175600/@comment-24191375-20150525204944

IF (BUTTON AND 16) OR (BUTTON AND 512) THEN GOSUB @FIRE

if the buttons A or R are pressed, run the @FIRE subroutine.

@FIRE

IF MISSLE0Y>-16 THEN RETURN

MISSLE0Y=PLAYER0Y

MISSLE0X=PLAYER0X

RETURN

If the missle is visible on screen, just end the subroutine here and go back.

If the missle is off screen, it is moved to where the player is.

  IF MISSLE0Y>-16 THEN MISSLE0Y=MISSLE0Y-(5*SLOW)

If the missle is on the screen, move it up 5 pixels if the variable SLOW is equal to 1 which it is most of the time.