# \[particle\] i need check endings one lifeCycle

**URL:** <https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182>\
**Category:** Questions\
**Tags:** particles\
**Created:** [June 28, 2019, 9:19am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182 "2019-06-28T09:19:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nedcrow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nedcrow/32/2663_2.png) [@nedcrow](https://forum.babylonjs.com/u/nedcrow)\
**Post date:** [June 28, 2019, 9:19am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/1 "2019-06-28T09:19:39Z")

</div>

Hello!  
I needs is title this question.  
But, i don want temp property for checking per frame.  
I hope simple than next example code.

```
let maxLife = 100;
let currentLife = 0;
particleSystem.upate({
  maxLife++;
  if(currentLife>=maxLife){ 
     'end!!'
  }
});

```

I don found about this method in particle api.  
Please! 🙏

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [June 28, 2019, 10:03am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/2 "2019-06-28T10:03:11Z")

</div>

The main issue is the life time is not per particle system but per particle as they are emitted over time. I do not think we should add a per particle observable for this as I doubt what use case it would achieve.

That said, could you explain a bit more about what you are trying to achieve ?

---

<div class="post-metadata">

**Author:** ![nedcrow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nedcrow/32/2663_2.png) [@nedcrow](https://forum.babylonjs.com/u/nedcrow)\
**Post date:** [July 1, 2019, 5:19am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/3 "2019-07-01T05:19:31Z")

</div>

I want check state that is emitted all particles.(at capacity)

[https://www.babylonjs-playground.com/#MRRGXL#22](https://www.babylonjs-playground.com/#MRRGXL#22)

if you saw front example, emitter’s position is all same at the every time.  
I want place of emitter to change every ‘boom!’ times.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 1, 2019, 4:58pm UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/4 "2019-07-01T16:58:44Z")

</div>

So you want it per particle or per system?

Because you may want to leverage the custom position function?  
[https://doc.babylonjs.com/how\_to/customise#custom-functions](https://doc.babylonjs.com/how_to/customise#custom-functions)

---

<div class="post-metadata">

**Author:** ![nedcrow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nedcrow/32/2663_2.png) [@nedcrow](https://forum.babylonjs.com/u/nedcrow)\
**Post date:** [July 2, 2019, 6:33am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/5 "2019-07-02T06:33:46Z")

</div>

Thank you. But i want per system.

I want to make it boom here and there, not just one place.  
So, I want to know the end time of emitter’s ‘maxLifeTime’.

Hm… really i have a check this all particle? or use setInterval?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 2, 2019, 4:09pm UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/6 "2019-07-02T16:09:24Z")

</div>

Well to be performant, the system does not track global values but instead let each particle be autonomous. So it has no idea when all particles die

But the way you setup your system give us a pretty good idea of when that event will happen so a setTimeout seems like a good option

---

<div class="post-metadata">

**Author:** ![nedcrow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nedcrow/32/2663_2.png) [@nedcrow](https://forum.babylonjs.com/u/nedcrow)\
**Post date:** [July 3, 2019, 1:52am UTC](https://forum.babylonjs.com/t/particle-i-need-check-endings-one-lifecycle/4182/7 "2019-07-03T01:52:52Z")

</div>

Okey. I got it.  
Particle system is very free.  
When sometime, looks like particle system need cemetery for dead particle.

I’ll use setTimeOut & setInterval.  
Thank you!
