I have this odd way to move objects but the static line of sight command is not working. Any help would be appreciated.
Thanks.
sync on
autocam off
make matrix 1,1000,1000,10,10
make object cube 1,10
pitch camera down 90
position camera 0,150,0
make object cube 3,10
m = 0
set object collision to boxes 1
do
los = static line of sight(object position x(1),object position y(1),object position z(1),object position x(3),object position y(3),object position z(3),5,10)
ay1# = object angle y(1)
if m > 0 then ay2# = object angle y(2)
if m > 0 then set object collision to boxes 2
if inkey$()="m" and m = 0
make object cube 2,10
position object 2,object position x(1),object position y(1),object position z(1)
m = 1
endif
if m = 1
if leftkey()=1 then turn object left 2,5
if rightkey()=1 then turn object right 2,5
if upkey()=1 then move object 2,5
if downkey()=1 then move object 2,-5
if spacekey()=1 then m = 3
endif
if m = 3
if los = 0 then ay1# = wrapvalue(ay1# + .1)
if los = 1 then m = 2
endif
if m = 2
move object 1,3
if object collision(1,2)=1
delete object 2
m = 0
endif
endif
if m = 1
position camera object position x(2),1000,object position z(2)
else
position camera object position x(1),1000,object position z(1)
endif
if m = 3
position object 3,object position x(1),object position y(1),object position z(1)
set object to object orientation 3,1
move object 3,500
endif
yrotate object 1,ay1#
sync
loop
P.S.
Controls are m to go into move mode arrows to move the move object and space to move the main cube.
"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
