Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I use below code to create my particles ( in fact, I don't know any other way.)

spawnedParticleComponents = WorldInfo.MyEmitterPool.SpawnEmitter(ParticleSystem'ParticleName', Location, Rotator );
spawnedParticleComponents.setTranslation(newLocation);
...

And unfortunately, I spawn many particles in game.

When I play my game, after some time, I see Exceeded max active pooled emitters! Warning in console .

To solve the problem, first, I tried spawnedParticleComponents.DeactivateSystem();, But it doesn't help. Then I try WorldInfo.MyEmitterPool.ClearPoolComponents(false);, But it doesn't either . :(

How can I destroy many spawned particles and avoid this warning ?

share|improve this question
    
I found a problem. I noticed `DeactivateSystem()' doesn't deactive my particleSystemComponent ! –  EmAdpres Sep 16 '12 at 14:03
add comment

1 Answer

I solve it!

Just do as below when you don't need a ParticleSystemComponent anymore .

spawnedParticleComponents.SecondsBeforeInactive=0;
spawnedParticleComponents.DeactivateSystem();
spawnedParticleComponents.KillParticlesForced();
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.