ok, don't forget that all of that code is running more than once a second. That means running from the top to the bottom with your eyes about FIVE times... it's impossible.
I say this because I noticed
if controlkey()=1 then V#=(V#+3)
If V#=>1 then Gravity=(Gravity+1)
If Gravity=>1 then Position object obj,Posx#,Posy#+3,Posz#
If V#=>3 then V#=0
which seemed to me, that in the space of time it took to run 4 lines of code (V is 3, then four lines down V is 0 because YOU MAY of taken your finger off the control button in time).
I didn't wander off and tell you about another way of coding this. Maybe you should think about it more logically. or you need more programming time, so I'm not going too fast.
Here is the code.. I added a matrix, made myself a box and commented afew lines out. It works.. DBC..
box goes up.
box goes down.
` load object "cat.3ds",7
make object box 7,10,10,10
` Substitute a box for the cat.
` Use the collision box dimensions to guess the size
`position object 7,539,40,472
` Position the box on the matrix
position object 7,539,11,472
`rotate object 7,0,270,0
` Let's face the bunker
rotate object 7,0,180,0
make object collision box 7,-2.5,-11.5,-2.5,2.5,11.5,2.5,0
make matrix 1,100,100,10,50
posy#=0.0
Player:
Do
for X = 1 to 6
for Y = 1 to 6
next X
next Y
Ground = Get ground height(1,Posx#,Posz#)
` Water= Object position Y(8)
obj=7
Gravity=0
V#=0.0
`camdist#=25 : camhigh#=posy#+10.0 : camfade#=3.5
` Too close to the cat
camdist#=100: camhigh#=posy#+20.0 : camfade#=3.5
set camera to follow Posx#,Posy#,Posz#,Angle#+180,camdist#,camhigh#,camfade#,1
`if upkey()=1 then move object 7,-2
`if downkey()=1 then move object 7,2
` Let's get there quickly
if upkey()=1 then move object obj,-4
if downkey()=1 then move object obj,4
`if leftkey()=1 then yrotate object 7,wrapvalue(angle#-5)
`if rightkey()=1 then yrotate object 7,wrapvalue(angle#+5)
` Easy on the turns
if leftkey()=1 then yrotate object obj,wrapvalue(angle#-2)
if rightkey()=1 then yrotate object obj,wrapvalue(angle#+2)
if shiftkey()=1 then position object obj,posx#,posy#+1,posz#
if controlkey()=1 then V#=V#+3
If V#=>1
Gravity=Gravity+1
else
Graivty = 0
endif
If Gravity=>1
Position object obj,Posx#,Posy#+3,Posz#
else
Gravity=0
endif
` If V#=>3 then V#=0
If Posy#=Ground then position object obj,Posx#,Ground,Posz#
If spacekey()=1
load object "Dynamite.3ds",10
position object 10,Posx#+5,Posy#-18,Posz#+5
scale object 10,15,15,15
endif
Text 10,350,"Gravity"+str$(Gravity)
Text 10,300,"Velocity"+str$(V#)
loop
bleep bleep