# Niagara secondary emitter Spawn count per particle ID or Index from first emitter?

**URL:** <https://forums.unrealengine.com/t/niagara-secondary-emitter-spawn-count-per-particle-id-or-index-from-first-emitter/261651>\
**Category:** FX\
**Tags:** General, unreal-engine, Blueprint, UE4-27\
**Created:** [November 19, 2021, 3:44am UTC](https://forums.unrealengine.com/t/niagara-secondary-emitter-spawn-count-per-particle-id-or-index-from-first-emitter/261651 "2021-11-19T03:44:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ey4D0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ey4D0](https://forums.unrealengine.com/u/Ey4D0)\
**Post date:** [November 19, 2021, 3:44am UTC](https://forums.unrealengine.com/t/niagara-secondary-emitter-spawn-count-per-particle-id-or-index-from-first-emitter/261651/1 "2021-11-19T03:44:11Z")

</div>

Hello,  
I am currently trying to create particles with links per each particles. I am approaching this by spawning a particles on a sphere, where the particle count is being read by a user integer custom attribute. The custom count is being read from a jason file via blueprint.

Now regarding the links related to the particles. I am spawning a secondary particles for the links based on the first particles. That said I am having Particles A (Nodes) and Particles B (the links). Particles B count per particle need to be set via array custom attribute to set the secondary particle count per particle. I am not clear on how to handle per particle attribute by custom array.

So lets say Particle A ID number 134 has 4 links (Spawned count for particle B), how can I map that attribute via Array Int32 input per particle?

If any article or link that could help on this as well would be super appreciated!  
I have found almost no documentation on advanced features of Niagara.  
Also I was looking at this video, no project files and no responses on the requests for the files:  
[Diving Into Niagara: Intelligent Particle Effects | Unreal Fest Online 2020](https://youtu.be/oX6uiPWXJDY?t=1120)

Please help, thank you.

---

<div class="post-metadata">

**Author:** ![LukasDaum](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lukasdaum/32/624985_2.png) [@LukasDaum](https://forums.unrealengine.com/u/LukasDaum)\
**Post date:** [October 11, 2022, 1:06pm UTC](https://forums.unrealengine.com/t/niagara-secondary-emitter-spawn-count-per-particle-id-or-index-from-first-emitter/261651/2 "2022-10-11T13:06:48Z")

</div>

since you seem to have a fixed number of particles you can spawn X particles in emitter A on the mesh via SpawnBurstInstantaneous module script in emitter update of A. then you do the same in emitter B but with X \* 4 if you have 4 links per particle. Then you need to write a scratchpad in B to sample values of particles in emitter A. therefor you use the index. the index you want to access is the ExecutionIndex of B divided by 4 (number of links) then you get the source particle and can read all values from it. you might need to check “Requires Persisten IDs” in the emitter properties of A

hope that helps 🙂
