rem store object angle
CameraAngleY#=Camera Angle Y()
rem control input for camera
if upkey()=1
Xtest# = newxvalue(X#,CameraAngleY#,20)
Ztest# = newzvalue(Z#,CameraAngleY#,20)
move camera 12
if sound playing(1)=0 then play sound 1
endif
if downkey()=1
Xtest# = newxvalue(X#,wrapvalue(CameraAngleY#),20)
Ztest# = newzvalue(Z#,wrapvalue(CameraAngleY#),20)
move camera -6
if sound playing(1)=0 then play sound 1
endif
rem running control
if shiftkey()=1
Xtest# = newxvalue(X#,CameraAngleY#,20)
Ztest# = newzvalue(Z#,CameraAngleY#,20)
move camera 30
if sound playing(3)=0 then play sound 3
endif
rem mouse control for camera
position mouse 320,240
cx#=wrapvalue(cx#+mousemovey() )
cy#=wrapvalue(cy#+mousemovex() )
cz#=wrapvalue(cz#+mousemovez() )
Rem Rotate camera
if cx#>270
if cx#-270 > 90 then cx#=270
else
if cx# > 90 and cx#-270<270 then cx#=90
endif
rotate camera cx#,cy#,cz#
X# = Camera Position X()
Z# = Camera Position Z()
Y# = get ground height(1,X#,Z#)
if Y# >42000
X# = camera position x()
Y# = 41999
Z# = camera position z()
endif
if Y# < -248.35
fog distance 5500
pause sound 1
pause sound 2
pause sound 3
pause sound 4
pause sound 5
RANDOMIZE TIMER()
waterSound = RND(350)
if waterSound = 1 then play sound 6
if waterSound = 101 then play sound 6
else
fog distance 9500
stop sound 6
resume sound 1
resume sound 2
resume sound 3
resume sound 4
resume sound 5
endif
position camera X#,Y#+120,Z#
my last post screwed up. once again, thanx in advance. you guys have thus far been a big help to this noob.