Can someone edit this code to get the character to stay on the platform?
:ClrDraw :AxesOff :CoordOff :LabelOff :PlotsOff :FnOff :GridOff :0->Xmin:94->Xmax :0->Ymin:62->Ymax :Line(0,1,94,1 :Line(0,2,94,2 :Line(40,12,45,12:Line(40,11,45,11 :Line(45,22,50,22:Line(45,21,50,21 :Line(50,32,55,32:Line(50,31,55,31 :Line(55,42,60,42:Line(55,41,60,41 :Line(60,52,94,52:Line(60,51,94,51 :35->X:3->Y:3->B //B is the Y value of the base that Y will fall to; it can be 3,13,23,33,43,or 53 :While 1 :If X>=40 and X<=45 and Y<12:Then :6->P //P is jump height, which prevents you from jumping up through a platform. :Else:13->P:End :Pt-On(X,Y :Pt-Off(X-2,Y :Pt-Off(X+2,Y :Line(X-1,Y+1,X+1,Y+1,0 :X->A:B->Y :getKey->K :X-2(K=24 and X>=3)+2(K=26 and X<=91)->X :If K=25:Then :If Y>=53:5->P :For(Y,B+1,B+P) :Pt-On(X,Y :Pt-Off(X,Y-1 :End :Line(X-4,B+P,X+4,B+P,0 :For(I,1,2) //beginning of mid-air movement :getKey->K :X+2(K=26 and X<=91)-2(K=24 and X>=3)->X :End //End of mid-air movement. Disadvantage: you can only move in mid-air at height of your jump. //I'm pretty sure that all the code is fine up until this point. Now, I'm having trouble on the gravity descent. :For(Y,B+P,B+1,-1 //THIS IS where I'm having trouble breaking the loop if a platform is detected underneath you. :Pt-On(X,Y :Pt-Off(X,Y+1 :If pxl-Test(63-Y,X)=1 and C≠1:Then //Maybe I'm just crazy, but for some reason, the "Then" made part of it work better. :1->C //doing all crazy things with the var C, so that this block of code doesn't repeat :B+P->Y :B+10->B :End:End :Y->B :End:End