Hi,
I do not know if anyone has made this in DBC, so I share my code.
sync on
sync rate 60
autocam off
position camera 0,0,-500
`make white bar
make object box 1,600,60,10
position object 1,0,0,300
`left cube
make object cube 9,100
position object 9,-100,0,0
color object 9,rgb(255,0,0)
`ghost object right cube
ghost object on 9
`right cube
make object cube 10,100
position object 10,100,0,0
color object 10,rgb(255,0,0)
`second right cube for transparency effect
make object cube 11,100
position object 11,100,0,0
color object 11,rgb(255,0,0)
`apply transparency effect
ghost object on 10
ghost object on 11,1
do
`rotate white bar
xrotate object 1,object angle x(1)+1
`rotate right cube
zrotate object 9,object angle z(9)+1
`rotate left cubes
zrotate object 10,object angle z(10)+1
zrotate object 11,object angle z(11)+1
`text info
text 0,0,"The two cubes are red, and 'ghost object' changes the color, but not the 'transparency'"
text 200,150,"ghost object"
text 350,150,"transparency object"
`
if scancode() then end
sync
loop
have fun!
DirectX 9.0c (February 2010)/ DBClassic v1.13