Thanx.
Now on to the collisions. I have worked on it for a while and I am still having problems with it. It doesn't work at all.
Here's the code:
load object "H-AK47-Static.x",1
scale object 1,300,300,300
xrotate object 1,0
lock object on 1
position object 1,0.5,-0.90,1
load object "Game Media_Level twowarehouse.x",2
set object 2,1,1,1
set camera range 1,2700
rem collision data
make object box 3,80,100,80
hide object 3
set object collision on 3
set object collision on 2
position camera 200,-175,200
sync on
hide mouse
do
sync
rem update varibles for mouse movement
camx# = wrapvalue(camx#+(mousemovey()*0.23))
camy# = wrapvalue(camy#+(mousemovex()*0.23))
camz# = wrapvalue(camz#+(mousemovez()*0.23))
rem limit the rotation
if camx# <70 and camx# > 180 then camx# = 290
if camx# >70 and camx# < 180 then camx#=70
rem update camera angles
rotate camera 0,camy#,camz#
rem loop collision position varibles
oldposx# = camera position x()
oldposy# = camera position y()
oldposz# = camera position z()
position object 3,oldposx#,oldposy#,oldposz#
rem camera_movement
if upkey() = 1 then move camera 10
if downkey() = 1 then move camera -10
xrotate camera camx#
rem set new varibles
posx#=camera position x()
posy#=camera position y()
posz#=camera position z()
position camera posx#,posy#,posz#
if object collision(3,2)>0
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
endif
loop
The warehouse building is the static collision but I didn't know how to get it to work because you are in the warehouse and its objects inside are part of the warehouse object. (Sorry no media)
(So one object that you are inside of and you start out floating off the ground because I used a collision box around the camera that is off the ground so not in collsion)