Don't forget to use
before doing anything with cameras.
Something like this (plus Rich Dersheimer's suggestion):
set display mode desktop width(), desktop height(), 32
sync on : sync : sync
autocam off
EditorViews()
ViewPorts()
make object cube 1, 50
repeat
sync
until spacekey()
end
`setup editor views
`camera 0 is default camera, and it will be used for perspective view
`camera 1 - top view
`camera 2 - side view
`camera 3 - front view
function EditorViews()
`make cameras for viewports
color backdrop 0, rgb(0, 0, 60) ` added for demo purpose only
make camera 1
color backdrop 1, rgb(0, 60, 0) ` added for demo purpose only
make camera 2
color backdrop 2, rgb(60, 0, 0) ` added for demo purpose only
make camera 3
color backdrop 3, rgb(0, 50, 40) ` added for demo purpose only
`setup cameras
`perspective view
set camera range 0,0.1,1000000
position camera 0,-500,250,-250
point camera 0,0,0,0
`top view
position camera 1,0,500,0
point camera 1,0,0,0
`side view
position camera 2,-500,0,0
point camera 2,0,0,0
`front view
position camera 3,0,0,500
point camera 3,0,0,0
endfunction
`setup editor viewports
`camera 0 is default camera, and it will be used for perspective view
`camera 1 - top view
`camera 2 - side view
`camera 3 - front view
function Viewports()
`setup viewports
`perspective view
set camera view 0,screen width()/2,screen height()/2,screen width(),screen height()
`top view
set camera view 1,0,0,screen width()/2,screen height()/2
`side view
set camera view 2,screen width()/2,0,screen width(),screen height()/2
`front view
set camera view 3,0,screen height()/2,screen width()/2,screen height()
`select default camera
set current camera 0
endfunction