I am uploading a game where you are given X time to press the right key.
Code:
The For( loop isn’t working like I want it to. I want, after X executions, to decrement the second For( loop by the number of executions the first one just made. But it decrements during every execution, thus making the game get much too fast way too early. I have many ideas, sprite routines, score keeping, difficulty editing, just a bunch of stuff to add later but I want the game itself to work correctly. Help?
Code:
:ClrHome:ClrDraw
:AxesOff
:0→Q:... (this section just has a bunch of variable storage and isn’t the problem.)
:1000→A
:Lbl A
:A-B→A
:B+C→C
:For(M,1,C
:B+1→B
:ClrDraw
:randInt(1,5)→Z
:Text(55,(Z*22)-21,Z ;this section to be replaced by a sprite routine, but for now just using Z as the place holder.
:For(X,1,A
:End
:If getkey=Z+10:Q+1→Q:End:Goto A
:ClrDraw:AxesOn
:Disp “Loser” ;a much longer line of code to be added later, for statistical storing point data.
:End
The For( loop isn’t working like I want it to. I want, after X executions, to decrement the second For( loop by the number of executions the first one just made. But it decrements during every execution, thus making the game get much too fast way too early. I have many ideas, sprite routines, score keeping, difficulty editing, just a bunch of stuff to add later but I want the game itself to work correctly. Help?