In this example though the particles stay the original color of the texture. The ParticleColorRange seems to have no effect on them.
Not sure if this is a bug or if I'm just using this incorrectly. Any help is appreciated.
Code: Select all
;################PRESS ESCAPE TO QUIT##################
#CameraSpeed = 1
Define.f MouseX, MouseY
ExamineDesktops()
InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
W=DesktopWidth(0)
H=DesktopHeight(0)
If OpenWindow(0, 0, 0, W, H, "Particles", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, W, H, 0, 0, 0)
CreateTexture(2, 32, 32)
StartDrawing(TextureOutput(2))
Circle(16,16,16,RGB(255,255,255))
StopDrawing()
CreateMaterial(0, TextureID(2))
MaterialBlendingMode(0, #PB_Material_Add)
CreateLight(1, RGB(155,155, 155), 0, 500 , 0)
CreateParticleEmitter(0, 1000, 1000, 100, #PB_Particle_Box, 0, 700, -200)
ParticleMaterial(0, MaterialID(0))
ParticleEmitterDirection(0, 0, -1, 0)
ParticleTimeToLive(0, 6, 7)
ParticleEmissionRate(0, 100)
ParticleSize(0, 10, 10)
;################
ParticleColorRange(0, RGB(50,0,0), RGB(255,0,0))
CreateCamera(0, 0, 0, 100, 100)
CameraLocate(0, 0, 200, 150)
CameraBackColor(0,RGB(0,0,0))
Repeat
If ExamineMouse()
MouseX = -MouseDeltaX() * #CameraSpeed * 0.05
MouseY = -MouseDeltaY() * #CameraSpeed * 0.05
EndIf
If ExamineKeyboard()
EndIf
RotateCamera(0, MouseY, MouseX, 0, #PB_Relative)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
Else
MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf
End


