# How do I make as many objects spawn as are transmitted from another bluprint?

**URL:** <https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [June 30, 2024, 7:28pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924 "2024-06-30T19:28:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poor\_Game](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Poor\_Game](https://forums.unrealengine.com/u/Poor_Game)\
**Post date:** [June 30, 2024, 7:28pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/1 "2024-06-30T19:28:38Z")

</div>

Hi! can you help me? I wanted the player to specify the number of objects and they will spawn. I found how to make a span of vows. but there was a problem. I do not know how to make them spawn exactly the amount that the player indicated. 1 and 2 screenshots are how I implemented the spawn of objects. I hope you can tell me how to do it right.  
And another small problem in the 3rd screenshot. for some reason, the second and third layers of the isi Z are not spawned, but only in one row. I will be glad if you tell me what I did wrong.

 ![Снимок экрана 2024-06-30 221212](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc027f87020cf135b5805e9e41fcfdb5a9519e4.png)  
 ![Снимок экрана 2024-06-30 221225](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/e/0ae964817d547e6a8cdeb108d5df28534b9cf04f.png)  
 ![Снимок экрана 2024-06-30 221313](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/1/301be989817d6dac88be7dfc82e0f24c7efb69e0.jpeg)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [June 30, 2024, 8:24pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/2 "2024-06-30T20:24:23Z")

</div>

This might be simpler. There is a macro that does a grid

 ![spawn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/8/fb8b0b98e31c4b45612f150661a0e632fd828ab1.png)  
You might just need to adjust the starting offset if you don’t want it to start from the center.

---

<div class="post-metadata">

**Author:** ![Poor\_Game](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Poor\_Game](https://forums.unrealengine.com/u/Poor_Game)\
**Post date:** [June 30, 2024, 8:29pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/3 "2024-06-30T20:29:38Z")

</div>

Thank you for telling me how to simplify it. And how do I transfer the required number of objects to be created here?

---

<div class="post-metadata">

**Author:** ![Poor\_Game](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Poor\_Game](https://forums.unrealengine.com/u/Poor_Game)\
**Post date:** [June 30, 2024, 8:30pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/4 "2024-06-30T20:30:59Z")

</div>

Thank you for telling me how to simplify it. how do I transfer the required number of objects to be created here?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [June 30, 2024, 8:31pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/5 "2024-06-30T20:31:49Z")

</div>

![exposeMax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/b/25bb09656bfe26cf449e2a5521d0ef1eb9527fbe.png)  
I moved the max amount of spawns to the function input  
You can also move the sizeX and sizeY to the input pins of the function if you need to change it.

Just drag the X and Y of the grid func to the red function Spawn near the max Amount and it will connect.

 ![XY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/d/4cd6aad7b80b3a4919711f584a5b7558f293c419.png)

Version with line trace

 ![lineTr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/c/5ac8ee7f2691ca680effef0862a4304daa16dd6e.png)

Just turn off the debug of the line trace 😉

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 30, 2024, 8:32pm UTC](https://forums.unrealengine.com/t/how-do-i-make-as-many-objects-spawn-as-are-transmitted-from-another-bluprint/1921924/6 "2024-07-30T20:32:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
