Issue with Get Num Particles

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

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.

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

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