here is the whole code if anyone wants it
REM Project: Strategy
REM Created: 13/2/05 1:36:42 PM
REM
REM ***** Main Source File *****
REM
rem __________________________________ loading ______________________________________________
set display mode 1024,768,16
sync on : sync rate 60
load image "bitmaps/grass03[540x396].bmp",1
make matrix 1,5000,5000,50,50
prepare matrix texture 1,1,1,1
load object "objects/small house.x",1 : scale object 1,5000,5000,5000 : position object 1,2500,0,2500
rem ____________________________ camera and its boundaries __________________________________
make object box 2,1,1,7500 : position object 2,5001,750,2500
make object box 3,1,1,7500 : position object 3,-1,750,2500
make object box 4,5000,1,1 : position object 4,2500,750,4501
make object box 5,5000,1,1 : position object 5,2500,750,-501
make object box 6,5000,500,5000 : position object 6,2500,-270,2500 : color object 6,rgb(128,128,128)
make camera 1 : position camera 1,2500,750,2000 : point camera 1,2500,0,2500
automatic camera collision 1,10,1
rem _____________________________________ commands __________________________________________
housebuild=0 : houseNo=100 : houseflag=0 : blah=0 : GUI$="none" : outpostbuild=0 : outpostNo=1100 : outpostflag=0
rem ____________________________________ main loop __________________________________________
do
`__________GUI's_________
if GUI$="none"
ink rgb(10,16,58),1 : box 15,576,1009,753
ink 1,1 : bnl=30 : bnt=600 : bnr=70 : bnb=640
box bnl,bnt,bnr,bnb,rgb(225,12,15),rgb(225,12,15),rgb(255,255,255),rgb(255,255,255) : set text size 64 : center text 50,590,"B"
box 90,600,130,640,rgb(15,225,15),rgb(15,225,15),rgb(255,255,255),rgb(255,255,255) : set text size 64 : center text 110,590,"G"
endif
if GUI$="build"
ink rgb(10,16,58),1 : box 15,576,1009,753
ink rgb(240,240,240),1
set text size 18 : text 20,581,"house (H)" : text 20,596,"outpost (O)"
endif
if keystate(48)=1 OR (mouseclick()=1 AND mousex()=>bnl AND mousex()=<bnr AND mousey()=>bnt AND mousey()=<bnb) then GUI$="build"
`________________________
cx=camera position x(1) : mx=( (mousex()-512)*1.433 ) + ( ((mousey()-384)*.643) )
cy=camera position y(1) : my=0
cz=camera position z(1) : mz=(1.726*768)-(1.526*mousey())
rem side movements
if mousex()=<15 OR leftkey()=1 then position camera 1,cx-20,cy,cz
if mousex()=>1009 OR rightkey()=1 then position camera 1,cx+20,cy,cz
if mousey()=<15 OR upkey()=1 then position camera 1,cx,cy,cz+20
if mousey()=>753 OR downkey()=1 then position camera 1,cx,cy,cz-20
rem corner movements
if (mousex()=<15 AND mousey()=<15) OR (leftkey()=1 AND upkey()=1) then position camera 1,cx-15,cy,cz+15
if (mousex()=>1009 AND mousey()=<15) OR (rightkey()=1 AND upkey()=1) then position camera 1,cx+15,cy,cz+15
if (mousex()=<15 AND mousey()=>753) OR (leftkey()=1 AND downkey()=1) then position camera 1,cx-15,cy,cz-15
if (mousex()=>1009 AND mousey()=>753) OR (rightkey()=1 AND downkey()=1) then position camera 1,cx+15,cy,cz-15
if keystate(20)=1 AND blah=0
for t=1 to 4
clone object t+50,1
scale object t+50,5000,5000,5000
next t
position object 51,cx-950,0,cz+1300
position object 52,cx-475,0,cz+100
position object 53,cx+950,0,cz+1300
position object 54,cx+475,0,cz+100
blah=1
endif
`__________________build house_______________________
if keystate(35)=1 AND GUI$="build" then housebuild=1
if housebuild=1 and houseflag=0
load object "objects/small house.x",houseno
ghost object on houseno,0
scale object houseno,5000,5000,5000
position object houseno,cx+mx,0,cz+mz
GUI$="none"
wait mouseclick()=1
ghost object off houseno
housebuild=0
houseno=houseno+1
houseflag=1
endif
if keystate(35)=0 then houseflag=0
`___________________build outpost____________________
if keystate(24)=1 AND GUI$="build" then outpostbuild=1
if outpostbuild=1 and outpostflag=0
load object "objects/Outpost.x",outpostno
ghost object on outpostno,0
scale object outpostno,5000,5000,5000
position object outpostno,cx+mx,0,cz+mz
GUI$="none"
wait mouseclick()=1
ghost object off outpostno
outpostbuild=0
outpostno=outpostno+1
outpostflag=1
endif
if keystate(35)=0 then outpostflag=0
set cursor 10,10 : set text size 12 : print cx;",";mx;",";(cx+mx)
set cursor 10,20 : print cz;",";mz;",";(cz+mz)
sync
loop