0 Members and 1 Guest are viewing this topic.
.PLATFORM...X X valueY y value...40-> X5-> YClrHome[FF99BDFFFFBD99FF]-> Pic1Repeat getKey (15)ClrDrawPt-On (X, Y, Pic1)Line (0,62,95,62)Line (0,0,0,62)DispGraphIf getKey (1)Y+1-> YIf Y> 5454-> YEndEndIf getKey (4)Y-1-> Y40-> YIf Y <40Y+1-> YEndEndIf getKey (2)X-1-> XIf X <01-> XEnd EndIf getKey (3)X+1-> XEndIf Y <54Y+1-> YEndEnd
If getKey(54) and (pxl-Test(X,Y+8))15->JEndIf J>0Y-1->YJ-1->JEndIf (pxl-Test(X,Y+8)=0) and (J=0)Y+1->YEnd
.AAL5+0->°VY1L5+2->°Y1L5+4->°VY2L5+6->°Y2Fix 51->P0->A0->VY156->Y10*256->VY256*256->Y2While 1 VY1+1->VY1 Y1+VY1->Y1 If Y1>=56 56->Y1 If getKey(4) ~10->VY1 Else 0->VY1 End End Rect(10,Y1,8,) VY2+3->VY2 Y2+VY2->Y2 If Y2/256>=56 56*256->Y2 If getKey(4) ~256->VY2 Else 0->VY2 End End Rect(0,Y2/256,8,) DispGraphClrDraw min(20,getKey(54)?A+1)->A-1??100,0 Pause xor P->P "NoSlowmo"->°NoSlowmo Text(0,,(P-1?2)+°NoSlowmo)EndIf getKey(15)ClrHome
The program works now. I just didn't know that you had to space the section of your While command.
Now I really understand the difference. I guess this would be of some use to my game, because it does look more smooth than the 10 pixel jump (I'm talking about the 256 pixel inflation).
Thanks for the help. Now one last thing before I consider the topic solved: How do you make your character jump if there is no "platform" (Line) beneath him? Taking from my code a couple replies back, I don't know if I should just change the entire routine or not.
...inflation by 256 makes the jump a lot slower but by changing some constants you can get a pretty fast jump "even" with inflation by 256.