I cant get my test object to show up... (object 1)
If you take out the camera movement, it works, but otherwise it doesn't.
`Interface Setup
load image "allied interface.bmp",1
sprite 1,0,360,1
`/Interface Setup
`Unit 1 Testing
make object plain 1,100,100
position object 1,0,0,0
color object 1,rgb(255,0,0)
xrotate object 1,90
dim x(1) `current x coord
dim y(1) `current y coord
dim z(1) `current z coord
dim dx(1) `destination x
dim dz(1) `destination y
dim sel(1) `unit selected?
dim side(1) `unit's side?
x(1)=0
y(1)=0
z(1)=0
sel(1)=0
side(1)=1
`/Unit 1 Testing
tu=1 `Total Units... Use to limit cyclers.
`Camera Control
position camera 0,320,-400,240
point camera 0,320,0,240
ncx=camera position x(0)
ncz=camera position z(0)
`/Camera Control
`Light Control
position light 0,camera position x(0),camera position y(0),camera position z(0)
point light 0,camera position x(0),0,camera position z(0)
`/Light Control
sync on
sync rate 100
do
show object 1
`Test Info
text 50,100,str$(object position x(1))
text 50,125,str$(object position y(1))
text 50,150,str$(object position z(1))
text 50,200,str$(camera position x(0))
text 50,225,str$(camera position z(0))
`/Test Info
`move camera around
control camera using arrowkeys 0,1,1
position light 0,camera position x(0),camera position y(0),camera position z(0)
point light 0,camera position x(0),0,camera position z(0)
`/move camera around
`Select Test Object
c=1 `CYCLER
while c<=tu `loop for selection and interaction
if mouseclick()=1 then if mousex()>object position x(1)-object size x(1)/2 then if mousex()<object position x(1)+object size x(1)/2
if mousey()>object position z(1)-object size y(1)/2 then if mousey()<object position z(1)+object size y(1)/2
sel(1)=1
endif
endif
if sel(1)=1 then text 50,175,"Obj Sel=1"
if mouseclick()=2
cls `remove later
sel(1)=0
endif
`/Select Test Object
c=c+1
endwhile
sync
loop