To make camera or player jump, use something like this:
ink rgb(0,80,0),0
box 0,0,100,100
ink rgb(0,100,0),0
box 20,20,80,80
get image 1,0,0,100,100
autocam off
sync on
make object box 100,250,1,250
texture object 100,1:scale object texture 100,30,30
for i= 1 to 20
make object box i,10,10,10
position object i,-100+rnd(200),5,-100+rnd(200)
next i
do
control camera using arrowkeys 0,0.1,0.1
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
rotate camera cam#,a#,0
cx#=camera position x()
cz#=camera position z()
`JUMP
if mouseclick() = 2 and gravity# = 0.0
gravity# = 0.5
gravity_smooth# = 0.005
endif
dec gravity#, gravity_smooth#
inc cy#, gravity#
if cy# < 0
gravity# = 0.0
gravity_smooth# = 0.0
endif
position camera cx#,5+cy#,cz#
sync
loop
I'm not a grumpy grandpa
