i havent had mutch time today to have a play with the tomb but here it is with fps style movement
sync on: sync rate 0
color backdrop 0
hide mouse
set camera fov 90
set ambient light 70
load object "tomb.dbo",1
set object transparency 1,1
scale object 1,300,300,300
load object "lght.3ds",2
scale object 2,300,300,300
ghost object on 2
set object 2,1,1,0
dir$=get dir$()
charht#=50
spd#=3
radius#=10.0
position camera 0,charht#,0
yrotate camera 180
checks=8
if checks<4 then checks=4
if checks>360 then checks=360
angwidth=360/checks
dim ang#(checks-1,2)
dim sort#(checks-1,2)
do
if scancode()=0 then hold=0
if returnkey()=1 and hold=0
hold=1
if srate=60
srate=0
else
srate=60
endif
sync rate srate
endif
oldx#=camera position x()
oldz#=camera position z()
cx#=camera position x()
cy#=camera position y()
cz#=camera position z()
ca#=camera angle y()
mx#=mousemovex()/4.0
my#=mousemovey()/4.0
xrotate camera wrapvalue(camera angle x()+my#)
yrotate camera wrapvalue(camera angle y()+mx#)
if camera angle x()>80 and camera angle x()<180 then xrotate camera 80
if camera angle x()<270 and camera angle x()>180 then xrotate camera 270
if upkey()=1
cx#=newxvalue(cx#,wrapvalue(ca#-360),spd#)
cz#=newzvalue(cz#,wrapvalue(ca#+360),spd#)
position camera cx#,cy#,cz#
endif
if downkey()=1
cx#=newxvalue(cx#,wrapvalue(ca#-180),spd#)
cz#=newzvalue(cz#,wrapvalue(ca#-180),spd#)
position camera cx#,cy#,cz#
endif
if leftkey()=1
cx#=newxvalue(cx#,wrapvalue(ca#-90),spd#)
cz#=newzvalue(cz#,wrapvalue(ca#-90),spd#)
position camera cx#,cy#,cz#
endif
if rightkey()=1
cx#=newxvalue(cx#,wrapvalue(ca#+90),spd#)
cz#=newzvalue(cz#,wrapvalue(ca#+90),spd#)
position camera cx#,cy#,cz#
endif
gosub _collision
gosub _ramp
sync
loop
_ramp:
cx#=camera position x()
cz#=camera position z()
oldht#=camera position y()
sub#=intersect object(1,cx#,oldht#,cz#,cx#,oldht#-(charht#*2),cz#)
ht#=(oldht#+charht#)-sub#
if sub#=0 then ht#=charht#
grav#=grav#-0.25
if oldht#+grav#<ht#
grav#=0.0
position camera cx#,ht#,cz#
else
ht#=oldht#+grav#
position camera cx#,ht#,cz#
endif
return
_collision:
for x=0 to checks-1
chx#=newxvalue(cx#,x*angwidth,100)
chz#=newzvalue(cz#,x*angwidth,100)
ang#(x,1)=intersect object(1,cx#,cy#,cz#,chx#,cy#,chz#)
if ang#(x,1)=0 then ang#(x,1)=999999
ang#(x,2)=x*angwidth
sort#(x,1)=ang#(x,1)
sort#(x,2)=ang#(x,2)
next x
for x=0 to checks-2
for y=x+1 to checks-1
if ang#(x,1)>ang#(y,1)
temp#=ang#(x,1)
temp2#=ang#(x,2)
ang#(x,1)=ang#(y,1)
ang#(x,2)=ang#(y,2)
ang#(y,1)=temp#
ang#(y,2)=temp2#
endif
next x
next y
prev=wrapvalue(ang#(0,2)-90)/angwidth
nxt=wrapvalue(ang#(0,2)+90)/angwidth
newd#=radius#-ang#(0,1)
newa#=wrapvalue(ang#(0,2)-180)
newd1#=radius#-sort#(prev,1)
newa1#=wrapvalue(sort#(prev,2)-180)
newd2#=radius#-sort#(nxt,1)
newa2#=wrapvalue(sort#(nxt,2)-180)
if ang#(0,1)<radius# and ang#(0,1)>0.0
repx#=newxvalue(cx#,newa#,newd#)
repz#=newzvalue(cz#,newa#,newd#)
position camera repx#,cy#,repz#
endif
cx#=camera position x()
cz#=camera position z()
if sort#(prev,1)<radius# and sort#(prev,1)>0.0
repx1#=newxvalue(cx#,newa1#,newd1#)
repz1#=newzvalue(cz#,newa1#,newd1#)
position camera repx1#,cy#,repz1#
endif
cx#=camera position x()
cz#=camera position z()
if sort#(nxt,1)<radius# and sort#(nxt,1)>0.0
repx2#=newxvalue(cx#,newa2#,newd2#)
repz2#=newzvalue(cz#,newa2#,newd2#)
position camera repx2#,cy#,repz2#
endif
return
just copy it over to a blank project and put it in with all the media in the zip and it shuld run fine..
still workin on the out door scene but might take me a lill while to do coz im still pritty new to modeling, work ect but will try keep ppl posted on the game as it progresses as mutch as i can..