Particles

Blitz3D Forums/Blitz3D Programming/Particles

Yeah, what you would do, is create a type:

Type particle
   Field entity
   Field x#,y#,z#
   Field time
   Field timer
   Field alive
   Field speed
End Type


Now, at the beginning you create the number of particles you need. Now, when a particle is born, you give it an x,y and z position a speed and set the time you want it to stay onscreen. Also, set the timer field to the millisecs() value so you can check if it's dead.


EDIT added in the entity field. You'll need this to store what you want to use as your particle :)
Now, whens it's dead, you simply hide it and set the alive field to 0, until a new one needs respawned, or do what you saoid, and move it back to where it comes from and randomise the x,y,z and speed and time fields. When you need to check which ones are currently aviable for respawning, you check the alive field. If it's at zero, then set it to 1 and unhide it :)