Okay, I am having some problems with the old build as well. The new one is not ready to show, but here is some of the code I am using:
sync on : sync rate 60
set display mode 1024,768,32
autocam off
mapsize =500
segments= 6
make matrix 1,mapsize,mapsize,segments,segments
load image "heightmap.bmp",1
size=256
load image "texture.bmp",2
prepare matrix texture 1,2,1,1
cls
paste image 1,0,0
modifier=size/segments
for x = 0 to segments
for y = 0 to segments
pixelcolor#=rgbr(point(x*modifier,y*modifier))
set matrix height 1,x,y,pixelcolor#
next x
next y
update matrix 1
load image "tree.bmp",3,1
load image "rose.bmp",4,1
Plants=200
for x = 1 to Plants/2
createplant(x,mapsize,1)
next x
for x = (Plants/2)+1 to Plants
createplant(x,mapsize,0)
next x
water=5000
make object plain water,mapsize,mapsize
load image "water.bmp",water
texture object water,water
set reflection shading on water
set alpha mapping on water,25
waterheight=15
position object water,mapsize/2,waterheight,mapsize/2
xrotate object water,-90
for x = 1 to Plants
if object exist(x)
if object position y(x)<=waterheight then delete object x
endif
next x
sky=5001
load image "sky.bmp",sky
make object sphere sky,(-mapsize*2)
texture object sky,sky
position object sky,mapsize/2,0,mapsize/2
You=11000
load object "H-Small Car Red-Move.x",You
scale object You,2000,2000,2000 `Make the object 20 times bigger.
set object collision on you
set object collision to polygons you
RainDrops=100 `Number of raindrops we'll have.
`Create 100 raindrops, color them blue,and then ghost them.
`To save processor power, and get just as good results, we just need to ghost them
`(No textures necessary).
for x = 72000 to 72000+RainDrops
make object plain x,.4,1
color object x,rgb(0,0,255)
ghost object on x,2
next x
do
x1#=object position x(You)
z1#=object position z(You)
y1#=get ground height(1,x1#,z1#)
ay1#=object angle y(You)
if upkey()=1 `We move the object forward when the upkey is pressed
move object you,movement#
endif
if downkey()=1 `We move the object backward when the downkey is pressed
move object you,-movement#
endif
if leftkey()=1
yrotate object you,ay1#-movement#`Rotate our object left when we press the left key.
endif
if rightkey()=1
yrotate object you,ay1#+movement#`Rotate our object right when we press the right key.
endif
set camera to follow x1#,y1#,z1#,ay1#,16,8,1,1
`Collision Detection with map and car
if x1#<=0 then position object you,1,y1#,z1#
if x1#>=mapsize then position object you,mapsize-1,y1#,z1#
if z1#<=0 then position object you,x1#,y1#,1
if z1#>=mapsize then position object you,x1#,y1#,mapsize-1
if down=0
move object water,.005
if object position y(water)>=waterheight then down=1
endif
if down=1
move object water,-.005
if object position y(water)<=waterheight-1 then down=0
endif
if y1#<object position y(water)
color ambient light rgb(0,0,192)
set shading off water
else
color ambient light rgb(255,255,255)
set reflection shading on water
endif
yrotate object sky,object angle y(sky)+.1
for x = 72000 to 72000+RainDrops
move object down x,1
rainheight#=get ground height(1,object position x(x),object position z(x))
if object position y(x)<rainheight#
position object x,rnd(mapsize),rainheight#+50,rnd(mapsize)
yrotate object x,ay1#
endif
next x
loop
function CleanUp()
for x = 1 to 99999
if image exist(x) then delete image x
if sound exist(x) then delete sound x
if object exist(x) then delete object x
next x
if matrix exist(1) then delete matrix 1
if music exist(1) then delete music 1
sync
endfunction
function createplant(id,size,flag)
if flag=1
load object "tree.x",id `Load our object
texture object id,3 `Texture it.
set object transparency id,4 `Set transparency on, and set the correct mode.
set object light id,0 `Disable lighting. This usually makes objects using
`plains look much nicer.
position object id,rnd(size),0,rnd(size) `Randomly position the object on our map.
height#=get ground height(1,object position x(id),object position z(id))
`Get the height of the ground where our object
`is at.
position object id,object position x(id),height#,object position z(id)
`Position our object at the grounds height.
else
load object "rose.x",id
texture object id,4
set object transparency id,4
set object light id,0
position object id,rnd(size),0,rnd(size)
height#=get ground height(1,object position x(id),object position z(id))
position object id,object position x(id),height#,object position z(id)
endif
endfunction
If someone would tell me what I am doing wrong it would be a big help.