Hi!
I’m working on an enemy system with Niagara with many thousand enemies at the same time. Everything is working fine so far, but I’m still trying to find a better solution for destroying my enemies.
What I’m trying to achieve:
- Enemies live infinitely
- Enemies are killed manually when they receive enough damage
Current approach:
- Use ParticlesLifetime for destroying. Simply just set it to zero
Problem:
- In order to use this, I have to check “Kill particles when lifetime ends” in ParticleState. However this means I need to assign a lifetime on spawn. Meaning enemies will just disappear when the lifetime has ended.
I tried to just set lifetime back to a higher number with <= check and if/select in ParticleUpdate. However this gets just ignored. I can’t seem to extend the lifetime, only reduce it.
I could just assign a very high value to lifetime on spawn but maybe there is another way? Any suggestions how to do this smoother?
Thanks!