0 Members and 1 Guest are viewing this topic.
ClrHomeClrDrawDiagnosticOff'DOWN[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1'RIGHT[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic2'LEFT[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic3'UP[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic41→A1→B0→XPt-On(A,B,Pic1While getKey(15)=0If getKey=0If D=1:Pt-On(A,B,Pic1)EndIf D=2:Pt-On(A,B,Pic2)EndIf D=3:Pt-On(A,B,Pic3)EndIf D=4:Pt-On(A,B,Pic4)EndEndPause 100DispGraphX+1→XIf X=20:0→XEndIf getKey(1)=1B+1→B1→DClrDrawPt-On(A,B,X/5*8+Pic1EndIf getKey(2)=1A-1→A2→DClrDrawPt-On(A,B,X/5*8+Pic3EndIf getKey(3)=1A+1→A3→DClrDrawPt-On(A,B,X/5*8+Pic2EndIf getKey(4)=1B-1→B4→DClrDrawPt-On(A,B,X/5*8+Pic4EndEnd
Hmm well you don't need to do ClrDraw, you can just do "Pt-Off(X,Y,Pic#" before you update it's X or Y location, and then draw the new sprite.
DiagnosticOff'DOWN[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1'LEFT[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic2'RIGHT[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic3'UP[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic41->C0->X0->YWhile 1C+1->CIf X^5=0C/5->Agetkey->KX+(K=3)-(K=2)->XY+(K=1)-(K=4)->YIf K=00->AElseK->DEndsub(DP)If K=15:Goto FN:EndEndEndLbl DSClrDrawIf D=1:Pt-Off(X,Y,A*8+Pic1:EndIf D=2:Pt-Off(X,Y,A*8+Pic2:EndIf D=3:Pt-Off(X,Y,A*8+Pic3:EndIf D=4:Pt-Off(X,Y,A*8+Pic4:EndDispGraphReturnLbl FN
DiagnosticOff'DOWN[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1'LEFT[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic2'RIGHT[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic3'UP[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic41->C0->X0->YWhile 1C+1->CIf X^5=0C/5->Agetkey->KX+(K=3)-(K=2)->XY+(K=1)-(K=4)->YIf K=00->AElseK->DEndsub(DP)ReturnIf K=15EndEndLbl DSClrDrawIf D=1:Pt-Off(X,Y,A*8+Pic1:EndIf D=2:Pt-Off(X,Y,A*8+Pic2:EndIf D=3:Pt-Off(X,Y,A*8+Pic3:EndIf D=4:Pt-Off(X,Y,A*8+Pic4:EndDispGraphReturn