I have been trying to attach the extends smoke particles to rockets being fired, but when I tried to delete any particles, the textures disappear and it leaves behind the planes that were used for the particles. I even used the example program and added a loop after the particles are deleted and the same problem still happened.
Here is the code from the example with my added loop at the end:
Set Display Mode 640 , 480 , 32
Sync On : sync Rate 0
Repeat : Sync : Until Screen Invalid() = 0
Color BackDrop 0 : Set Camera Range 1 , 1024
REM Fog On : Fog Color Rgb( 0 , 0 , 16 ) : Fog Distance 1024
Fog On
Set Point Light 0 , 0.0 , -0.1 , 0.0
Position Light 0, 0, 50000, 0
GROUND = IMG Load Image( "graphics\multi018.jpg" )
REM We check if DBProBasic3DExtends.dll is correctly initialized
OBJECT1 = B3D Make Object Plain( 1024 , 1024 )
Rotate Object OBJECT1 , 270 , 0 , 0
Texture Object OBJECT1 , GROUND
Particle1 = P3D Add Particle( 24, 0, 64 )
P3D Position Emitter Particle1, 128, 100, 0
P3D Set Particle Area Particle1, 96, 200, 96
P3D Set As Smoke Particle Particle1
Particle2 = P3D Add Particle( 24, 0, 64 )
P3D Position Emitter Particle2, -128, 100, 0
P3D Set Particle Area Particle2, 96, 200, 96
P3D Set As Smoke Particle Particle2
Particle3 = P3D Add Particle( 24, 0, 64 )
P3D Position Emitter Particle3, 0, 100, 128
P3D Set Particle Area Particle3, 96, 200, 96
P3D Set As Smoke Particle Particle3
Particle4 = P3D Add Particle( 24, 0, 64 )
P3D Position Emitter Particle4, 0, 100, -128
P3D Set Particle Area Particle4, 96, 200, 96
P3D Set As Smoke Particle Particle4
Count = 0
For XLoop = 1 to 32
If Object Exist( XLoop ) = 1 Then Inc Count , 1
Next XLoop
Rem Main Demo Loop
Repeat
Set Cursor 0 , 0 : Print "Frame Rate : ", Screen Fps()
Print "Press 1 to jump to 60 fps max"
Print "Press 2 to jump to max fps"
D$ = Inkey$()
If d$="1" Then Sync Rate 60
If d$="2" Then Sync Rate 0
XAdd# = ( UpKey() - DownKey() ) / 1.25 : YAdd# = ( RightKey() - LeftKey() ) / 1.25
YAngle# = WrapValue( Yangle# + YAdd# ) : XAngle# = WrapValue( Xangle# + XAdd# )
Rotate Camera XAngle# , YAngle# , 0
XMove# = ( ( MouseClick() = 1 ) - ( MouseClick() = 2 ) ) * 5.0
Move Camera XMove#
P3D Update Particles
B3D Update Billboards
Sync
Until SpaceKey() = 1
OBJECT1 = B3D Delete Object( OBJECT1 )
Particle4 = P3D Delete Particle( Particle4 ) : Particle3 = P3D Delete Particle( Particle3 )
Particle2 = P3D Delete Particle( Particle2 ) : Particle1 = P3D Delete Particle( Particle1 )
SMOKE = IMG Delete Image( SMOKE ) : GROUND = IMG Delete Image( GROUND )
do
control camera using arrowkeys 0, 1, 0.5
sync
loop
End
anybody have any idea why?
andromedapps.com