After playing around with it for a while I came up with this code addition so that the player can jump over a 100 unit ravine. Attached is an fpm to experiment with. I had adjusted it so that the player may not be able to jump it by walking and then jumping. He will have to run and then jump in order to get across.
NOTE: this assumes that the basespeed is initially set to Lee's original basespeed. If you have set the basespeed higher then you may have to adjust the multipliers. Speaking of which I really have tested the effects of adjusting each individual value of
jumpmotionz#=tmotionz# * 1.5
jumpmotionx#=tmotionx# * 1.5
camforcey#=playerdefaultjumpheight * 1.5
to a different multiplier.
rem Jump Control
if onladder=0
if player(plrid).health>0
if (plrkeySPACE)=1 and crouchmode=0 and plrkeyw = 1 and jumpactionnorepeat=0 and grav#>-1
jumpspeed#=speed# : jumpangle#=camera angle y() : leapedlanded=1
camvely#=0
jumpmotionz#=tmotionz# * 1.5
jumpmotionx#=tmotionx# * 1.5
camforcey#=playerdefaultjumpheight * 1.5
camforcey#=camforcey#*(0.5+(cameradampen#/2.0))
if playersound(plrid,10)>0
broadcast3dsound(camerapositionx,camerapositiony,camerapositionz,5.0)
play sound playersound(plrid,10)
endif
jumpaction=1 : jumpactionnorepeat=5
else
nojumpaction=0
if (plrkeySPACE)=1 and jumpaction=0 and meridinglift=0 and crouchmode=0 and jumpactionnorepeat=0 and grav#>-1
jumpspeed#=speed# : jumpangle#=camera angle y() : leapedlanded=1
camvely#=0
camforcey#=playerdefaultjumpheight
camforcey#=camforcey#*(0.5+(cameradampen#/2.0))
jumpmotionx#=tmotionx#
jumpmotionz#=tmotionz#
if playersound(plrid,10)>0
broadcast3dsound(camerapositionx,camerapositiony,camerapositionz,5.0)
play sound playersound(plrid,10)
endif
jumpaction=1 : jumpactionnorepeat=5
endif
endif
if jumpactionnorepeat>0
if jumpactionnorepeat>1 then dec jumpactionnorepeat
if jumpactionnorepeat=1 and grav#<0 then jumpactionnorepeat=0
endif
if jumpaction<>0
camvelx#=jumpmotionx#
camvelz#=jumpmotionz#
endif
endif
endif
If you add this and use the attached fpm, then start out by walking towards the ravine. Once you get to the edge, press the jump key. If you fail, try running to the edge and then press the jump key. For me, walking will fail most of the time but running will not.
Hope some might find this useful.
-----------------------------------------------
OliveTreeGames