I'm not at home atm and was trying to knock up some smoke. I know this isn't the best method but I'm really just testing this out. But the problem is I can't get the smoke to be dark gray. It's only showing up pure white. I've done smoke before and I'm not sure what's up with this.
You'll have to forgive me if it's simple. It's been awhile since I've done any programming. 8(
BTW, the "smoke.bmp" I am using is 64x64.
You'll have to forgive me if it's simple. It's been awhile since I've done any programming. 8(
BTW, the "smoke.bmp" I am using is 64x64.
;Smoke Graphics3D 800,600,32,2 SetBuffer BackBuffer() camera = CreateCamera() MoveEntity camera,0,0,-10 light = CreateLight() CameraClsColor camera, 150,190,150 Global FX=LoadSprite("smoke.bmp") EntityBlend fx,3 EntityFX fx,1 HideEntity fx Global p.part Type part Field ent Field alpha#,fade#,fade_timer# Field xvel#,yvel#,zvel# Field xpos#,ypos#,zpos#,rot#,s# End Type While Not KeyHit(1) a=a+1 If a>10 a=0 Create_Smoke(0,-7,0) Create_Smoke(.6,-7,0) Create_Smoke(1.25,-7,0) EndIf Update_Smoke() UpdateWorld RenderWorld Flip Wend Function Create_Smoke(x#,y#,z#) p.part = New part p\ent = CopyEntity(FX) ;EntityColor p\ent,50,50,20 p\xvel =Rnd(-.0075,.0075) p\s=.5 p\xpos=x p\ypos=y p\zpos=z p\alpha = 1 p\fade = .0025 p\yvel = .03 p\rot = Rnd(-.5,.5) SpriteViewMode p\ent,2 End Function Function Update_Smoke() For p.part = Each part PositionEntity p\ent,p\xpos,p\ypos,p\zpos p\s = p\s + .005 ScaleSprite p\ent,p\s,p\s p\xpos = p\xpos + p\xvel p\ypos = p\ypos + p\yvel p\alpha = p\alpha - p\fade EntityAlpha p\ent,p\alpha TurnEntity p\ent,0,0,p\rot If p\alpha =< 0 FreeEntity p\ent Delete p EndIf Next End Function