There are many ways here is one.
sync on : sync rate 60
autocam off : randomize timer()
make matrix 1, 3000, 3000, 30, 30
make object box 1, 5, 10, 5
position object 1, 1500, 5, 1500
color object 1,rgb(0,0,255)
position camera 1500, 10, 1450
point camera 1500,5,1500
CamPosYDir = 1
CamPosFDir = 1
do
`turn camera right,make it face straight ahead(no up or down), move 1 unit
yrotate camera (camera angle y()+90)
xrotate camera 0
move camera 1
`make camer ago up and down
if camera position y() < 30
if CamPosYDir = 1
position camera camera position x(), (camera position y() + .25), camera position z()
endif
else
CamPosYDir = 0
endif
if camera position y() > 5
if CamPosYDir = 0
position camera camera position x(), (camera position y() - .25), camera position z()
endif
else
CamPosYDir = 1
endif
`point camera at player
point camera 1500,5,1500
`point the camera level (no up and down), move the camera in and out, point the camera at player
if abs(camera position x() - object position x(1)) > 20 or abs(camera position z() - object position z(1)) > 20
if CamPosFDir = 1
xrotate camera 0
move camera .25
point camera 1500,5,1500
endif
else
CamPosFDir = 0
endif
if abs(camera position x() - object position x(1)) < 35 or abs(camera position z() - object position z(1)) < 35
if CamPosFDir = 0
xrotate camera 0
move camera -.25
point camera 1500,5,1500
endif
else
CamPosFDir = 1
endif
sync
loop
I'm sure there are better ways too.