morcilla,
I have knocked up a small test program to attempt to find out what's going on with the 3d line command.
It looks to me like lock object on is working by itself. It's when you use it in combination with ghosting or diable zwrite that you get the problem.
Here's the test code
autocam off
disable_zwrite=0
ghost_object=0
lock_object=0
zpressed=0
gpressed=0
lpressed=0
make object box 1,2,2,10
position object 1,0,0,10
make object triangle 2,0.5,0,2,2,0,20,2,-10,20
color object 2,rgb(0,255,0)
position camera 3,2,0
point camera 0,0,10
d3d_init
d3d_color 255,0,0,100
do
if scancode()=44
if zpressed=0
zpressed=1
if disable_zwrite=0
disable_zwrite=1
disable object zwrite 1
else
disable_zwrite=0
enable object zwrite 1
endif
endif
else
zpressed=0
endif
if scancode()=34
if gpressed=0
gpressed=1
if ghost_object=0
ghost_object=1
ghost object on 1
else
ghost_object=0
ghost object off 1
endif
endif
else
gpressed=0
endif
if scancode()=38
if lpressed=0
lpressed=1
if lock_object=0
lock_object=1
lock object on 1
else
lock_object=0
lock object off 1
endif
endif
else
lpressed=0
endif
d3d_line3d 0.5,0,2,2,0,20,1
text 0,0,"zwrite_enabled="+str$(disable_zwrite)
text 0,15,"lock object="+str$(lock_object)
text 0,30,"ghost object="+str$(ghost_object)
loop
'z' toggles zwrite
'l' toggles lock object
'g' toggles ghost object
Ghosting appears to have no effect on the 3dline command (it acts as if the object is still solid)
zwrite makes the line appear on top regardless.
Lock works when used on its own.
Let me know if you see the same results.
EDIT - On further investigation, I can't see what more I can do with this. I've exausted my limited knowledge. I'll plow on but I'm not really getting anywhere.
Cheers,
Cloggy