Various functions by Anonymous Coder30th Dec 2004 15:56
|
---|
Summary rem color rgb backdrop function colciel(r,g,b) color backdrop rgb(r,g,b) endfunction function fog(r,g,b,dist) fog on fog color rgb(r,g,b) fog distance dist endfunction rem faire ob Description rem color rgb backdrop Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com rem color rgb backdrop function colciel(r,g,b) color backdrop rgb(r,g,b) endfunction function fog(r,g,b,dist) fog on fog color rgb(r,g,b) fog distance dist endfunction rem faire object 3d+col+pos+col100rot function box(nbr,x,y,z,r,g,b,x#,y#,z#,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot) make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# make object collision box nbr,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot endfunction rem faire object 3d+col+pos+col100rot function boxrac(nbr,x,y,z,r,g,b,x#,y#,z#,text) make object box nbr,x,y,z color object nbr,rgb(r,g,b) texture object nbr,text position object nbr,x#,y#,z# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 endfunction rem faire object 3d+col+pos function box100col(nbr,x,y,z,r,g,b,x#,y#,z#) make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# endfunction rem ciel spherique function sphere(nbr,rayon,r,g,b,x#,y#,z#,tr) make object sphere nbr,rayon set object nbr,1,1,0,1,1,0,1 color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# if tr=1 ghost object on nbr endif endfunction function arbre(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,gd,sr,sg,sb,sx,sy,sz) if image exist(101)=0 then load image "troncAr.bmp",101 if image exist(102)=0 then load image "feuilleAr.bmp",102 make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x1#,y1#,z1# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 texture object nbr,101 make object sphere sbr,gd color object sbr,rgb(sr,sg,sb) position object sbr,x1#,y1#+y/2,z1# scale object sbr,sx,sy,sz texture object sbr,102 endfunction function immeuble(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,tt) if image exist(100)=0 then load image "immeuble.bmp",100 make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x1#,y1#,z1# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 texture object nbr,100 make object box sbr,x/4,tt,z/4 color object sbr,rgb(r,g,b) position object sbr,x1#,y1#+tt*2 -50,z1# make object collision box sbr,object size x(sbr)/2.0*-1,object size y(sbr)/2.0*-1,object size z(sbr)/2.0*-1,object size x(sbr)/2.0,object size y(sbr)/2.0,object size z(sbr)/2.0,0 endfunction function light(nbr,r,g,b,x#,y#,z#) make light nbr color light nbr,rgb(r,g,b) position light nbr,x#,y#,z# endfunction function im(im$,nbr) load image im$,nbr,2 endfunction function herbe(nbr,h,x#,y#,z#) if image exist(103)=0 then load image "herbe.bmp",103 make object box nbr,0.5,h,0.5 position object nbr,x#,y#,z# texture object nbr,103 endfunction function mod(nom$,nbr,x#,y#,z#) load object nom$,nbr position object nbr,x#,y#,z# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 endfunction function son(nom$,nbr) load sound nom$,nbr endfunction |