im making a game and cant get fog and the get terrain height command to work right. the fog almost works but it doesnt show up on my terrain. im using DBP
here is my code:
rem setup game
make camera 1
fog on
fog distance 10
fog color RGB(200,200,200)
color backdrop 1,RGB(200,200,200)
rem make level
make terrain 1,"C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaheightmapsmap3.bmp"
load image "C:Program FilesDark Basic SoftwareDark Basic ProfessionalDemosCShoptexturesmiscdirt.jpg",1
texture terrain 1,1
rem make player
load image "C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaTexturescheckerboard.bmp",2
make object sphere 1,2
texture object 1,2
zrotate object 1,90
position object 1,0,45,0
position camera 1,0,46,-5
rem control player
do
X#= object position x(1)
Y#= object position y(1)
Z#= object position z(1)
A#= object angle y(1)
D#=4
H#=1
Y#=get terrain height(1,X#,Z#)
set camera to follow 1,X#,Y#,Z#,A#,D#,H#,100.0,1
if upkey()
scroll object texture 1,-0.01,0
move object 1,0.1
endif
if downkey()
scroll object texture 1,-0.01,0
move object 1,-0.1
endif
if rightkey() then pitch object down 1,1
if leftkey() then pitch object up 1,1
loop