ok!
i've created a code, just to test something. i wanted to do a box and use this for line of sight. But collision didn't work at all. It gave me zero all the time.(you can see, if there's collision between the sight box and red box by the number in the upper left corner). Anyway, here's the code. Someone please help me figure this one out?? please? PLEEASEEEE? :-s
sync on
sync rate 0
hide mouse
make matrix 1,500,500,20,20
load image "C:\MatEdit1_6\Tiles\Grass.bmp",1
prepare matrix texture 1,1,1,1
fill matrix 1,1,1
color backdrop rgb(0,0,0)
playerobject1=1
playerobject2=2
enemyobject1=3
set global collision on
make object cube playerobject1,5
color object playerobject1,RGB(16,56,192)
make object cube playerobject2,5
color object playerobject2,RGB(128,0,0)
make object cube enemyobject1,20
color object enemyobject1,RGB(16,116,16)
position object playerobject1,200,5,100
position object playerobject2,200,5,150
position object enemyobject1,250,10,120
make object cube 4,20
scale object 4,500,100,100
ghost object on 4
set object collision on 4
set object collision on 2
position camera 100,100,100
point camera 200,5,100
glue object to limb 4,3,0
position object 4,0,0,65
yrotate object 4,90
do
if upkey()=1 then move object playerobject1,1
if downkey()=1 then move object playerobject1,-1
if leftkey()=1 then yrotate object playerobject1,wrapvalue(object angle y(playerobject1)-10)
if rightkey()=1 then yrotate object playerobject1,wrapvalue(object angle y(playerobject1)+10)
point camera object position x(1),object position y(1),object position z(1)
point object 3,object position x(1),object position y(1),object position z(1)
rotate object 3,0,object angle Y(3),0
set cursor 0,0
print collision#
if object collision(2,3)>0
collision#=1
else
collision#=0
endif
sync
loop
if me in trouble() and 1=1 then print "but"