I have just had an idea of using the mouse to control a plain on the matrix. the only media you need is one for the target/plain (yellow?) and a grass one.
Tell me wat you think and see if it works if it doesnt could anyone have a look at fixing it?
``````````````````````````````````````````````````````
``````````````````````````````````````````````````````
````````````````````STRATERGY GAME````````````````````
``````````````````````````````````````````````````````
``````````````````````````````````````````````````````
autocam off
rem make matrix
make matrix 1,5000,5000,50,50
load bitmap "grass2.bmp",4
get image 4,0,0,256,256
delete bitmap 4
prepare matrix texture 1,4,2,2
rem position camera
position camera 0,125,0
point camera 100,5,100
set camera fov 90
camx=camera position x()
camy=camera position y()
camz=camera position z()
rem make a building
make object box 1,25,77,25
position object 1,250,37.5,250
clone object 1,2
position object 2,250,37.5,350
clone object 1,3
position object 3,350,37.5,350
clone object 1,4
position object 4,350,37.5,250
make object box 5,100,10,100
position object 5,300,25,300
clone object 5,6
position object 6,300,65,300
rem make a target which is locked to mouse
make object plain 7,50,50
xrotate object 7,90
position object 7,150,1,150
load bitmap "gridyellow.bmp",5
get image 5,0,0,256,256
delete bitmap 5
texture object 7,5
tarx=object position x(7)
tary=object position y(7)
tarz=object position z(7)
do
gosub controlcamera
gosub controlmouse
sync
loop
```````````GOSUBS
rem control camaera
controlcamera:
camx=camera position x()
camy=camera position y()
camz=camera position z()
if upkey()=1 then position camera camx+7,camy,camz+7;position object 7,tarx+7,tary,tarz+7
if downkey()=1 then position camera camx-7,camy,camz-7;position object 7,tarx-7,tary,tarz-7
if leftkey()=1 then position camera camx-7,camy,camz+7;position object 7,tarx-7,tary,tarz+7
if rightkey()=1 then position camera camx+7,camy,camz-7;position object 7,tarx+7,tary,tarz-7
if controlkey()=1 then set cursor 0,0; print " x>>>",camx," y>>>",camy," z>>>",camz
camx=camera position x()
camy=camera position y()
camz=camera position z()
return
rem control mouse
controlmouse:
mosmovx=mousemovex()
mosmovy=mousemovey()
mosmovz=mousemovez()
tarx=object position x(7)
tary=object position y(7)
tarz=object position z(7)
if mosmovx=mosmovx+1 then position object 7,tarx+50,tary,tarz+50
if mosmovx=mosmovx-1 then position object 7,tarx-50,tary,tarz-50
if mosmovy=mosmovy+1 then position object 7,tarx+50,tary,tarz+50
if mosmovy=mosmovy-1 then position object 7,tarx-50,tary,tarz-50
tarx=object position x(7)
tary=object position y(7)
tarz=object position z(7)
mosmovx=mousex()
mosmovy=mousey()
mosmovz=mousez()
return
Rich
Resist the power of the ring...