0 Members and 2 Guests are viewing this topic.
:.Jump:[guysprite]->Pic1:0->J //our jump variable:1->X //players x coord:55->Y //players y coord:Repeat getKey(15) //main loop:ClrDraw:Line(0,63,95,63) //line on bottom:Pt-On(X,Y,Pic1) // draw the guy:DispGraph:If getKey(4) and (pxl-Test(X,Y+8)) //see if pressed up and standing on ground:10->J //change the 10 to set how high he jumps:End:If (J>0) //if player is currently jumping:Y-1->Y //move him up- aka: jump:J-1->J //decrament J:End:If (pxl-Test(X,Y+8)=0) and (J=0) //see if not jumping and not anything beneath it:Y+1->Y //this is our gravity- move him down:End:Pause 100 //slows down our loop so we can see what's happening:End