ok fro my FPS i finally fund a code snippet for jumping in the code snippet section the problem is ther eis no limit on how high you can jump so if you keep pressing shift you go up,up,and away
.
i want it so you only jump a little high. here is my code you can see were the jump thing is because it is marked with a rem. thank you
rem start sync, load objects and sprites
load object "desk.x",4
load object "grass.x",3
load object "hallwayroof2.x",2
load object "thompson.3DS",1
lock object on 1
position object 1,15,-5,30
position object 2,10,5,10
load image "crosshair.bmp",1,1
sprite 1,280,230,1
hide mouse
set camera range 1,9000
sync on
sync rate 0
rem start main loop!
do
rem start to jump
ch=camera position y()+height
rem Jump
if shiftkey()=1 and jump=0
height=height+3
jumpb=1
endif
if jumpb=1
position camera camera position x(),camera position y()+height,camera position z()
endif
if ch>0
height=height-0.1
endif
if shiftkey()=0
jump=0
endif
rem start movement
if upkey()=1 then move camera 10.0
if downkey()=1 then move camera -10.0
if leftkey()=1 then angley#=wrapvalue(angley#-2.0)
if rightkey()=1 then angley#=wrapvalue(angley#+2.0)
xrotate camera 0.0
yrotate camera angley#
zrotate camera 0.0
position mouse 320,240
cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
cz#=wrapvalue(cz#+mousemovez())
rotate camera cx#,cy#,cz#
sync
loop
Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/