# Issue with Get Num Particles

**URL:** <https://forums.unrealengine.com/t/issue-with-get-num-particles/490773>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [November 10, 2021, 4:01am UTC](https://forums.unrealengine.com/t/issue-with-get-num-particles/490773 "2021-11-10T04:01:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien-Robert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Julien-Robert](https://forums.unrealengine.com/u/Julien-Robert)\
**Post date:** [November 10, 2021, 4:01am UTC](https://forums.unrealengine.com/t/issue-with-get-num-particles/490773/1 "2021-11-10T04:01:13Z")

</div>

I’m trying to program a custom grid location script in Niagara.

It works in the Niagara simulation but as soon as I put it inside a level, the particles go to a single point. I’m guessing my problem is around local vs simulation space of my particles positions but I can’t figure how to solve it. I tried to reverse engineered the box location script without success.

Here is attached the script and an image.

alt text

---

<div class="post-metadata">

**Author:** ![Julien-Robert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Julien-Robert](https://forums.unrealengine.com/u/Julien-Robert)\
**Post date:** [November 13, 2021, 6:07pm UTC](https://forums.unrealengine.com/t/issue-with-get-num-particles/490773/2 "2021-11-13T18:07:13Z")

</div>

The problem was not coming from the local/simulation space, it was with the object I used to find the number of particles in my location script.  
I dont understand why but Engine.Emitter.NumParticles (like in the snapshot) gives me 0.

 ![352112-capture-decran-le-2021-11-13-a-130303.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/a/d2a65b7a5dc74658abbd78f73974e819d0b9854d.jpeg)

I also tried (second image) Particle Attributer Reader - \> Get Num Particles and I get an error I don’t understand : Source emitter not found.

 ![352113-capture-decran-le-2021-11-13-a-130518.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/2/49271e622c163898a85b2b461c1cb6c3cd2cb888.jpeg)

 ![352114-capture-decran-le-2021-11-13-a-130627.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/5/52595cbe7febdabdb6153e90ae0adcc8e9e20690.png)

---

<div class="post-metadata">

**Author:** ![Julien-Robert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Julien-Robert](https://forums.unrealengine.com/u/Julien-Robert)\
**Post date:** [November 13, 2021, 6:14pm UTC](https://forums.unrealengine.com/t/issue-with-get-num-particles/490773/3 "2021-11-13T18:14:03Z")

</div>

Everytime I try to set the Emitter name, Unreal crashes.
