Is there any way to stop a ghosted object from having faded parts on the faces facing away the ambient light??
I'm trying to make some nice effects with the fade object command, but there's always like half of the object completely transparent...
Is there a way to have the whole object visible, but still be able to use fade object (with ambient light always on 0) ?
ehh, kinda crappy texture (as its made in the program), anyway - here are teh codez (see when the camera's behind the object, it is completely invisible...) :
set display mode 1024,768,16
sync on
sync rate 60
set ambient light 0
make matrix 1,1000,1000,10,10
color backdrop 0
set camera range 1,100000
x=0
y=0
z=0
ink rgb(255,255,255),0
for px=0 to 128
for py=0 to 128
d=rnd(1)
if d=1 then dot px,py
next py
next px
get image 1,0,0,128,128
gosub load
do
cx#=newxvalue(x,wrapvalue(time),400)
cz#=newzvalue(z,wrapvalue(time),400)
position camera cx#,get ground height(1,cx#,cz#)+400,cz#
point camera x,y,z
if spacekey()=1 then on=1
if on=1 then gosub perform
sync
loop
load:
dim ability_effect(12,4)
for g=1 to 4
for c=1 to 12
ability_effect(c,g)=make_sphere(20)
scale object ability_effect(c,g),400+(c*20),400+(c*20),400+(c*20)
texture object ability_effect(c,g),1
set object cull ability_effect(c,g),0
ghost object on ability_effect(c,g)
fade object ability_effect(c,g),0
if g=1 then position object ability_effect(c,g),x-130,y,z-130
if g=2 then position object ability_effect(c,g),x-130,y,z+130
if g=3 then position object ability_effect(c,g),x+130,y,z-130
if g=4 then position object ability_effect(c,g),x+130,y,z+130
next c
next g
dim ability_tubeeffect(10)
for p=1 to 10
ability_tubeeffect(p)=make_cylinder(100)
texture object ability_tubeeffect(p),1
set object cull ability_tubeeffect(p),0
ghost object on ability_tubeeffect(p)
hide object ability_tubeeffect(p)
position object ability_tubeeffect(p),x,y+200,z
scale object ability_tubeeffect(p),100+(p*7.5),500,100+(p*7.5)
next p
return
perform:
inc time
if time<100
for g=1 to 4
for c=1 to 12
nowfade#=time*c/5
fade object ability_effect(c,g),nowfade#+60
next c
next g
endif
xrotate object ability_effect(1,1),wrapvalue(object angle x(ability_effect(1,1))+rnd(8)-4)
yrotate object ability_effect(1,1),wrapvalue(object angle y(ability_effect(1,1))+rnd(8)-4)
zrotate object ability_effect(1,1),wrapvalue(object angle z(ability_effect(1,1))+rnd(8)-4)
for g=1 to 4
for c=12 to 2 step -1
xrotate object ability_effect(c,g),object angle x(ability_effect(c-1,1))
yrotate object ability_effect(c,g),object angle y(ability_effect(c-1,1))
zrotate object ability_effect(c,g),object angle z(ability_effect(c-1,1))
position object ability_effect(c,g),object position x(ability_effect(c-1,g)),object position y(ability_effect(c-1,g)),object position z(ability_effect(c-1,g))
next c
next g
if time>150 and time<250
for g=1 to 4
point object ability_effect(1,g),x,y,z
move object ability_effect(1,g),1.5
for p=1 to 12
fade object ability_effect(p,g),(time-150)*-1+100+60
next p
next g
endif
if time=250
for g=1 to 4
for p=1 to 12
hide object ability_effect(p,g)
next p
next g
endif
if time=251
for p=1 to 10
show object ability_tubeeffect(p)
next p
endif
if time>250 and time<300
for p=1 to 10
fade object ability_tubeeffect(p),time-100
next p
endif
if time>250
yrotate object ability_tubeeffect(1),wrapvalue(object angle y(ability_tubeeffect(1))+rnd(8)-4)
for p=10 to 2 step -1
yrotate object ability_tubeeffect(p),object angle y(ability_tubeeffect(p-1))
next p
endif
if time>500 and time<600
for p=1 to 10
fade object ability_tubeeffect(p),(time-500)*-1+100
scale object ability_tubeeffect(p),100+(p*20)+(time-400),500,100+(p*20)+(time-400)
next p
endif
return
unload:
return
function make_cube(size)
objno=30
repeat
inc objno
exist=object exist(objno)
until exist=0
make object cube objno,size
endfunction objno
function make_plain(size)
objno=30
repeat
inc objno
exist=object exist(objno)
until exist=0
make object plain objno,size,size
endfunction objno
function make_sphere(size)
objno=30
repeat
inc objno
exist=object exist(objno)
until exist=0
make object sphere objno,size,20,20
endfunction objno
function make_cylinder(size)
objno=30
repeat
inc objno
exist=object exist(objno)
until exist=0
make object cylinder objno,size
endfunction objno
function load_image(filename$)
repeat
inc imgno
exist=image exist(imgno)
until exist=0
load image filename$,imgno,1
endfunction imgno
-Formerly DarkSephiroth-