Hi,
I've got a problem with DarkShader. I hope this is the appropriate place to ask about it.
I haven\'t found a tutorial for DarkShader. I\'ve figured out a few things, and even exported an effect file into my project. But when I tried to load it, it just changed the object\'s color to black (American spelling of color, I know). It didn\'t reflect the object environment like I was hoping it would. Later the object disappeared altogheter.
I\'ve tried multiple objects and shaders. I\'m probably being an idoit
, but does anyone feel like helping out an idoit
today. Thanks!!
Here\'s the code I\'m using. I would think the problem is somewhere around line 12 where I load the effect file.
`landscape by daygamer
sync on : sync rate 60 : hide mouse
`ground
make matrix 1,1000,1000,100,100
load image \"textures\\grass1.BMP\",1
prepare matrix texture 1,1,10,10
randomize matrix 1,2
update matrix 1
make object cube 1,10
set effect on 1,\"models\\relection.fx\",1
`load object \"models\\Policecar.dbo\",1
`load image \"models\\policeCa.bmp\",1
`texture object 1,1
`set effect on 1,\"models\\reflection.fx\",1
`scale object 1,1000,1000,100000
`sky
load object \"models\\sky04\\sky04.3ds\",99
scale object 99,100000,100000,100000
position object 99,500,-100,500
set camera range 1,1000000
`landscape
for t = 100 to 200
load object \"trees\\Firsttree.dbo\",t
position object t,rnd(1000),0,rnd(1000)
scale object t,100+rnd(50),100+rnd(50),100+rnd(50)
set object transparency t, 3
yrotate object t,rnd(360)
next t
for p = 201 to 300
load object \"plants\\LSgrass.dbo\",p
scale object p,30,10,30
position object p,rnd(1000),0,rnd(1000)
set object transparency p, 3
yrotate object p,rnd(360)
next p
for t = 301 to 350
load object \"trees\\LSoak.dbo\",t
position object t,rnd(1000),0,rnd(1000)
scale object t,100+rnd(50),100+rnd(50),100+rnd(50)
set object transparency t, 4
yrotate object t,rnd(360)
next t
for r = 351 to 400
load object \"plants\\LSrock.dbo\",r
position object r,rnd(1000),0,rnd(1000)
scale object r,10+rnd(150),10+rnd(150),10+rnd(150)
yrotate object r,rnd(360)
next r
for m = 401 to 450
load object \"plants\\LSmushroom.dbo\",m
position object m,rnd(1000),0,rnd(1000)
scale object m,5+rnd(10),5+rnd(10),5+rnd(10)
set object transparency m, 3
yrotate object m,rnd(360)
next m
for f = 451 to 500
load object \"plants\\LSflower.dbo\",f
position object f,rnd(1000),0,rnd(1000)
scale object f,4+rnd(4),4+rnd(4),4+rnd(4)
set object transparency f, 3
yrotate object f,rnd(360)
next f
load music \"music\\06 Big Sky.mp3\",1
load music \"music\\04 Indian Summer.mp3\",2
load music \"music\\08 Nature of the Beast.wma\",3
load music \"music\\01 Morning Dance.wma\",4
load music \"music\\11 Lucky Bounce.wma\",5
position camera 500,10,500
point camera 500,10,1000
autocam on
do
`if upkey()=1 then move camera 3
`if downkey()=1 then move camera -3
`if rightkey()=1 then turn camera right 5
`if leftkey()=1 then turn camera left 5
if upkey()=1 then move object 1,3
if downkey()=1 then move object 1,-3
if rightkey()=1 then turn object right 1,5
if leftkey()=1 then turn object left 1,5
`camera
aY# = object angle Y(1)
X# = Object position x(1)
Z# = Object position z(1)
bX# = Newxvalue(X#,aY#-180,30)
bZ# = Newzvalue(Z#,aY#-180,30)
Position Camera bX#,15,bZ#
Point camera X#,10,Z#
`play music
if play=0 and inkey$()=\"p\"
`for s = 1 to 5
`if sound playing (s) then stop sound s
`next s
loop music rnd(4)+1
play=1
endif
if inkey$()=\"p\"
play=0
endif
if inkey$()=\"`\" then loop music 3
sync
loop
Have a nice day, God Bless You!