To make the button gosub instead of goto to, 1 solution is :
As for the multi press and the way you are doing it, you have to check for when the button is released also. So when you have a button press, set a flag, then next time through the loop, if the flag is set, ignore the press. when the button is released, clear the flag.Code:main button goto no_ship 'if button is NOT pressed, skip the gosub gosub ship ' if button was pressed gosub and return no_ship button goto no_fire gosub fire no_fire .... goto main
If cnt2==cnt gosub add
you can move this line outside of the for next loop. It will be true each time the loop counts to cnt. so just process it before jumping back to main.
as for the counting, you could use a timer setup as a counter. Just load it with a number, then in your mainloop check for an overflow. If it did, call your add. This way, as the levels get harder, just change the preload for the timer.




Bookmarks