IT DOESN"T WORK!
Sync On
Sync Rate 30
Hide mouse
Backdrop on
Set camera range 1,50000
Fog on
Fog distance 4000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)
Rem make matrix
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "steel01.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
rem Randomize the matrix
randomize matrix 1,125
X#=5000
Z#=5000
rem load textures
load image "spistol.bmp",2
rem create decorative objects
load image "cottag02.bmp",300
t=300
For x = 1 to 9
For z = 1 to 9
Make object cube t,100
Scale object t,400,600,100
y = get ground height(1,x*1000,z*1000)
position object t,x*1000,y+275,z*1000
texture object t,300
scale object texture t,1,-6
inc t
next z
next t
rem make gun01
load object "s&w4506.x",1
Scale object 1,3,3,3
Yrotate object 1,270
position object 1,5,-4,15
Lock object on 1
rem make gun02
load object "MP-40.x",10
Scale object 10,25,25,25
position object 10,5,-6,15
Lock object on 10
hide object 10
rem make gun03
load object "MP-5.x",11
Scale object 11,25,25,25
position object 11,5,-6,15
Lock object on 11
hide object 11
rem make gun04
load object "shotgun.x",12
Scale object 12,25,25,25
position object 12,5,-3,15
Lock object on 12
hide object 12
Rem Make bullet
Make Object Sphere 2,1
texture object 2,2
Hide Object 2
rem make enemies
load object "thugidle.x",3
Fix Object Pivot 3
Loop Object 3
mX# = 5000
mZ# = 5000
mY# = Get Ground Height(1,5000,5000)
X# = 5500
Y# = Get Ground Height(1,5500,5500)
Z# = 5500
MonsterScore=0
PlayerScore=0
Gosub PlaceMonster
set object speed 3,30
rem main loop
Do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
if inkey$()="1" and w1 = 0 then w1 = 1:w2 = 0
if inkey$()="2" and w2 = 0 then w1 = 0:w2 = 1
if inkey$()="1" then hide object 10:hide object 11:hide object 12:show object 1
if inkey$()="2" then hide object 1:hide object 11:hide object 12:show object 10
if inkey$()="3" then hide object 1:hide object 10:hide object 12:show object 11
if inkey$()="4" then hide object 1:hide object 10:hide object 11:show object 12
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
if Mouseclick()=1 and BulletLife=0
Position object 2,X#+8,Y#+43,Z#
Set object to camera orientation 2
BulletLife =25
Show object 2
Endif
If Downkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-180),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-180),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If Rightkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#+90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#+90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Endif
Endif
If BulletLife > 0
Dec BulletLife
Move object 2,20
If BulletLife = 0 then Hide object 2
Endif
Yrotate camera CurveAngle(CameraAngleY#,OldCamAngleY#,24)
Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)
Y# = Get ground height(1,X#,Z#)
Position Camera X#,Y#+50,Z#
Rem Refresh Screen
Sync
Loop
PlaceMonster:
mX#=X#
mY#=Y#
mZ#=Z#
mX#=rnd(10000)
mZ#=rnd(10000)
mY#= get ground height(1,mX#,mZ#)
mX#=X#
mY#=Y#
mZ#=Z#
Position object 3,mX#,mY#,mZ#
return
I'm exited in boresville....what does that tell you?