Particle effects on multiple objects

I have a ship shooting missiles and I wanted to put smoke trails on them. I have the effects loaded and I self.effect.reparentTo(bullet) which puts the smoke on the projectile.

The problem is that if you shoot two in a short burst then the last one has the trail and the first one does not. How do I attach a particle effect to a bullet and keep it there?

You need to load the effect twice, once for each time you want to use it.

David

I’ve dine it by creating a class that’s basically just the particle effect.
To create multiple instance of it, I created a list…

particles = range(0,100) #limit the number of particle Effects

particles[0] = particleEffect()
particles[1] = particleEffect()

...

This way each element of the list holds its own particle effect. These elements can be manipulated individually, so you’ll be able to have an individual particle effect for each of your rockets.

That works :slight_smile: I had to do a bit of tweaking to get them to keep coming. I just need to edit the particle effect a bit more and that part is done.