0 Members and 1 Guest are viewing this topic.
:55→S→T:8→O:2→I:For(V,0,I):0→{V*5+L5}:0→{V*5+L5+3}:End:.Main Loop:Repeat getKey(25):.All the other getkeys:If getKey(54):If T=S:For(V,0,I):!If {V*5+L5}:1→{V*5+L5}:0→T:Goto X:End:End:End:End:Lbl X:If R:Pt-On(X,Y,L*8+Pic1):Else:Pt-On(X,Y,FlipH(L*8+Pic1):End:For(V,0,I):If {V*5+L5}=1:X+4→{V*5+L5+1}:Y+1→{V*5+L5+2}:Pt-On({V*5+L5+1},{V*5+L5+2},Pic2:1→{V*5+L5+3}:2→{V*5+L5}:R→{V*5+L5+4}:End:End:For(V,0,I):If {V*5+L5+3}:If {V*5+L5+4}:{V*5+L5+1}++:Else:{V*5+L5+1}--:End:Pt-On({V*5+L5+1},{V*5+L5+2},Pic2):End:End:For(V,0,I):If {V*5+L5+1}=1 or {V*5+L5+1}>90:sub(SET):Goto I:Lbl SET:0→{V*5+L5}→{V*5+L5+3}+100→{V*5+L5+1}→{V*5+L5+2}:Return:Lbl I:End:End:.Stuff:If T<S:T++:End:. Collision below:For(V,0,I):For(P,0,C):If {P*3+L2+2}:If abs({V*5+L5+1}-{P*2+L1})<6:If abs({V*5+L5+2}-{P*2+L1+1})<6:{P*3+L2}-O→{P*3+L2}:sub(SET):End:End:End:. Other stuff including enemy death code:DispGraph:End
.jump table goes hereData(-3r,0r,-2r,-1r,-1r,-2r,0r,-3r,1r,-2r,2r,-1r,3r,0r,2r,1r,1r,2r,0r,3r,-1r,2r,-2r,1r)->GDB1.vars.facing left (0)0->F.start at 10,1010->X->Y.not moving0->D->E.let's get this party startedRepeat getkey(15).2nd moves forwardIf getkey(54)X+D->XY+E->YEnd.Alpha moves backwardIf getkey(48)X-D->XY-E->YEnd.turning rightIf getkey(3)F++If F>110->FEndEnd.turning leftIf getkey(2)F--If F<<011->FEndEnd.put the directions from the jump table into D and E{F*2+GDB1}->D{F*2+1+GDB1}->E.draw the dudeClrDraw.who is a circleCircle(X,Y,2).(a small circle).draw a tailLine(X,Y,X-(D*3),Y-(E*3))DispgraphEnd
Pt-On(X-4,Y-4,F*8+Pic1