Hello again.....I am a DBC user and have been working on this 'basic pattern' for the village in my RPG/FPS game for months. The problem is I can not make my "wall and village" into solid objects without destroying the mouselook code. I am also at a loss at how to make rivers. If someone could point out errors or give me advice, I would truly apreciate it....
rem load music into file 1
Load music "Dance of Darkness.mid",1
rem play midi 1
play music 1
rem tree
Load image "bark02.bmp",2
Make object cylinder 5,47
Texture object 5,2
position object 5,6800,60,7990
Load image "bark02.bmp",2
Make object cylinder 6,47
Texture object 6,2
position object 6,6800,100,7990
Load image "bark02.bmp",2
Make object cylinder 7,47
Texture object 7,2
position object 7,6800,140,7990
rem village wall
Load image "cottag02.bmp",2
make object plain 1,2025,714
texture object 1,2
position object 1,5000,20,5900
Load image "cottag02.bmp",2
make object plain 4,2025,714
texture object 4,2
position object 4,5000,20,9000
rem village
Load image "aztec01.bmp",2
Make object box 10,300,400,300
Texture object 10,2
position object 10,6240,20,6269
rem village
Load image "aztec01.bmp",2
Make object box 12,300,400,300
Texture object 12,2
position object 12,5789,20,6699
rem village
Load image "aztec01.bmp",2
Make object box 13,300,400,300
Texture object 13,2
position object 13,6790,20,6899
Sync On
Sync Rate 34
hide mouse
Backdrop on
Set camera range 1,5000
Fog on
Fog distance 1400
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 "grass09.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 Main loop
Do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
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 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
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
There is no king who has not had a slave among his ancestors, and no slave who has not had a king among his
Ph33r the Ringwraiths