*digdigdigdig* I got it (old jump code):
rem set resolution
set display mode 800,600,16
rem manual synchronization on
sync on
rem dim functionvariables
dim number(0)
dim boxes(25,3)
rem make some platforms(they don't have to be visible)
makebox(0,460,640,480)
makebox(0,350,200,370)
makebox(500,420,640,460)
makebox(640,560,799,599)
makebox(0,580,550,599)
makebox(300,320,400,340)
makebox(500,250,640,270)
makebox(680,180,780,200)
makebox(400,120,600,140)
makebox(100,50,200,70)
rem create character animation
for a=1 to 9
circle 5,5,5
ellipse 5,17,5,7
line 5,20,a,35
line 5,20,10-a,35
get image a,0,0,11,35
cls
next a
cls
rem set starting variables
q=1
x=0
y=0
fall#=0.0
jump=1
rem main do-loop
do
rem record old values
ox=x
oy=y
rem clear the screen
cls
rem jump with returnkey(only if on platform)
if returnkey()=1 and collidingy=1 then fall#=12.0
rem make the jump movement
if jump=1
fall#=fall#-0.5
if fall#<-10.0 then fall#=-10.0
endif
rem update y with gravity
y=y-fall#
rem movement
if leftkey()=1 then x=x-5
if rightkey()=1 then x=x+5
rem reset variable
collidingy=0
rem check for collision
gosub collision
rem if moving, then set the new animation frame
if leftkey()=1 or rightkey()=1
q=q+1
if q=10 then q=1
else
q=5
endif
rem show character(normally I should use a sprite)
paste image q,x,y
rem synchronize
sync
loop
rem end-loop
rem function
function makebox(bx,by,ex,ey)
rem record data
boxes(number(0),0)=bx
boxes(number(0),1)=by
boxes(number(0),2)=ex
boxes(number(0),3)=ey
number(0)=number(0)+1
rem end function
endfunction
rem collision
collision:
rem check for all platforms
for a=0 to number(0)-1
rem draw the platform
box boxes(a,0),boxes(a,1),boxes(a,2),boxes(a,3)
rem check if the character with the platforms(11 is the X-size of the character and 35 is the Y-size of the character)
if x+11>boxes(a,0) and x<boxes(a,2) and y+35>boxes(a,1) and y<boxes(a,3)
rem make it sliding collision
if oy+35=<boxes(a,1) then y=oy : fall#=0.0 : collidingy=1
if oy=>boxes(a,3) then y=oy : fall#=0.0
if ox+11<=boxes(a,0) or ox>=boxes(a,2) then x=ox
endif
next a
rem return
return
As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4