|
Post by Azan on Jul 23, 2005 18:43:09 GMT -5
(note change the 15 in Createsphere to change the speed as well. ; Graphics3D Example ; ------------------
; Set 3D graphics mode
Graphics3D 800,600,32,1 SetBuffer BackBuffer()
Global cr,cg,cb,rr,rg,rb Global qr=Rnd(5) Global qg=Rnd(5) Global qb=Rnd(5)
camera=CreateCamera()
light=CreateLight()
Global cone=CreateSphere( 15 ) EntityAlpha cone,.3
Type par Field entity,dirx,diry,dirz,timer End Type
PositionEntity cone,0,0,5
While Not KeyDown( 1 ) RenderWorld createpar() updatepar() If cb<=0 Then rb=True cb=1 qb=Rnd(5) EndIf If cb>=255 Then rb=False cb=254 qb=Rnd(5) EndIf If cg<=0 Then rg=True cg=1 qg=Rnd(5) EndIf If cg>=255 Then rg=False cg=254 qg=Rnd(5) EndIf If cr<=0 Then rr=True cr=1 qr=Rnd(5) EndIf If cr>=255 Then rr=False cr=254 qr=Rnd(5) EndIf
CameraClsColor camera,cr,cg,cb
If rb=True Then cb=cb+qb EndIf If rr=True Then cr=cr+qr EndIf If rg=True Then cg=cg+qg EndIf If rb=False Then cb=cb-qb EndIf If rr=False Then cr=cr-qr EndIf If rg=False Then cg=cg-qg EndIf Flip
Wend
End
Function createpar() p.par=New par p\entity=CopyEntity(cone) p\dirx=Rnd(180) p\diry=Rnd(180) p\dirz=Rnd(360) EntityColor p\entity,cr,cg,cb p\timer=150 ;FreeEntity p\entity ;RotateEntity p\entity,p\dirx,p\diry,p\dirz RotateEntity p\entity,0,0,p\dirz End Function
Function updatepar() For p.par=Each par MoveEntity p\entity,.04,0,0 p\timer=p\timer-1 If p\timer=0 Then FreeEntity p\entity Delete p EndIf Next End Function
|
|
|
Post by Umbrafire on Jul 24, 2005 11:49:25 GMT -5
1) where did you get this, it doesnt look like your code 2) what is it? sorry, im really tired, cant think right now
|
|
|
Post by Azan on Jul 24, 2005 12:02:46 GMT -5
I actualy made it, however at the time I made it it was about a thousand degrees in my house so it doesnt look like my code, im modifying it now.
|
|
|
Post by Umbrafire on Jul 24, 2005 22:07:20 GMT -5
ok, but what does it do?
|
|
|
Post by Azan on Jul 25, 2005 16:15:28 GMT -5
Its just a particle effect (better versions in another thread) (its hard to explane so its just best you try it out )
|
|