Is it possible to to make this sprite move by getkey and if it is can u help me out Question Question

Code:
:Pxl-On(5,5
:Pxl-On(5,6
:Pxl-On(5,7

:Pxl-On(6,5
:Pxl-On(6,6
:Pxl-On(6,7

:Pxl-On(7,6

:Pxl-On(8,4
:Pxl-On(8,5
:Pxl-On(8,6
:Pxl-On(8,7
:Pxl-On(8,8


:Pxl-On(9,6
:Pxl-On(10,5
:Pxl-On(10,7

EDIT: Plz Dont Flame Im New To This
How does this do you for?

Code:

:Delvar ADelvar B
:Repeat K=22 /*quit when MODE is pressed*/
:Pxl-On(B,A
:Pxl-On(B,A+1
:Pxl-On(B,A+2
:Pxl-On(B+1,A
:Pxl-On(B+1,A+1
:Pxl-On(B+1,A+2
:Pxl-On(B+2,A+1
:Pxl-On(B+3,A-1
:Pxl-On(B+3,A
:Pxl-On(B+3,A+1
:Pxl-On(B+3,A+2
:Pxl-On(B+3,A+3
:Pxl-On(B+4,A+1
:Pxl-On(B+5,A
:Pxl-On(B+5,A+2
:getKey->K
:If K:Then
:Pxl-Off(B,A
:Pxl-Off(B,A+1
:Pxl-Off(B,A+2
:Pxl-Off(B+1,A
:Pxl-Off(B+1,A+1
:Pxl-Off(B+1,A+2
:Pxl-Off(B+2,A+1
:Pxl-Off(B+3,A-1
:Pxl-Off(B+3,A
:Pxl-Off(B+3,A+1
:Pxl-Off(B+3,A+2
:Pxl-Off(B+3,A+3
:Pxl-Off(B+4,A+1
:Pxl-Off(B+5,A
:Pxl-Off(B+5,A+2
:A+(A=/=91)(K=26)-(A>=0)(K=24)-->A
:B+(B=/=57)(K=34)-(B>0)(K=25)-->B
:End:End
ty ill try
You can really optimize things like that. Like this:

For(X,5,7,1
Pxl-On(5,X
Pxl-On(6,X
Pxl-On(8,X
End
Pxl-On(7,6
Pxl-On(8,4
Pxl-On(8,8
Pxl-On(96,
Pxl-On(10,5
Pxl-On(10,7
Aeromax wrote:
You can really optimize things like that. Like this:

For(X,5,7,1
Pxl-On(5,X
Pxl-On(6,X
Pxl-On(8,X
End
Pxl-On(7,6
Pxl-On(8,4
Pxl-On(8,8
Pxl-On(96,
Pxl-On(10,5
Pxl-On(10,7
For space, yes, but you'll lose a substantial amount of speed doing it that way.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement