REM ***************************************************************
REM ***************************************************************
REM ***************************************************************
REM Flight VTOL 1
REM Author Vampyre
REM ****************************************************************
REM ****************************************************************
REM ****************************************************************
REM ****************************************************************
autocam off
hide mouse
sync rate 60
sync on
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "foliage.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
rem Randomize the matrix
randomize matrix 1,125
update matrix 1
X#=5000
Z#=5000
rem Make drone to mark a back position
make object sphere 3,10
hide object 3
rem Aircraft Object
load object "jet.X", 2
rem Rotate and fix data so character faces right way
xrotate object 2,0
yrotate object 2,180
zrotate object 2,40
fix object pivot 2
position object 2,x,150,z
rem scale aircraft object
scale object 2,1000,1000,1000
cammode = 0
do
rem movement
x#=wrapvalue(x#+mousemovey())
y#=wrapvalue(y#+mousemovex())
z#=wrapvalue(z#+mousemovez())
rotate object 2, x#,y#,z#
if leftkey()=1
zrotate object 2, wrapvalue(object angle z(2) + 1)
endif
if rightkey()=1 then roll object right 2,12.5
if upkey()=1 then move object 2,40
if downkey()=1 then move object 2,-40
rem VTOL take off and landing
if controlkey()=1
position object 2,object position x(2),object position y(2)+height,object position z(2)
height=10
endif
if spacekey()=1
position object 2,object position x(2),object position y(2)-10,object position z(2)
height=height-1
endif
If InKey$() = "1" Then cammode = 1 : ` third person
If InKey$() = "2" Then cammode = 0 : ` first person
If cammode = 0
rem Place camera and set orientation to object for FPS
xx#=object position x(2)
yy#=object position y(2)
zz#=object position z(2)
a#=object angle y(2)
d#=200
h#=40
s#=50.0
set camera to follow xx#,yy#,zz#,a#,d#,h#,s#,1
if lookRight = 1 then turn camera right 90.0
if lookLeft = 1 then turn camera left 90.0
if lookUp = 1 then pitch camera up 45.0
if lookBack = 1 then turn camera right 180.0
else
rem Place as over head for 3rd person
move object 2,-150
position object 3,object position x(2),object position y(2),object position z(2)
move object 2,150
rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation 2
Endif
sync
loop
In any case.. i think this is kinda fun.. hehe.
- Merix
WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.