# How to limit the number of actors when spawning?

**URL:** <https://forums.unrealengine.com/t/how-to-limit-the-number-of-actors-when-spawning/504004>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-27, question, Blueprint\
**Created:** [March 4, 2022, 10:55am UTC](https://forums.unrealengine.com/t/how-to-limit-the-number-of-actors-when-spawning/504004 "2022-03-04T10:55:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rewhakki](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rewhakki/32/888178_2.png) [@rewhakki](https://forums.unrealengine.com/u/rewhakki)\
**Post date:** [March 4, 2022, 10:55am UTC](https://forums.unrealengine.com/t/how-to-limit-the-number-of-actors-when-spawning/504004/1 "2022-03-04T10:55:39Z")

</div>

![Screenshot (6834)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/e/25eb13460a95845d9290374f973f4c13737e9231.png)

I need to make it so that when the trigger is pressed, the actor spawns (I already did this), but after three spawns, further spawning should be prohibited. How to make a spawn counter so that spawning is prohibited after a certain amount? In short, you fired 3 shots and you can’t take any more. Thanks

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 4, 2022, 11:10am UTC](https://forums.unrealengine.com/t/how-to-limit-the-number-of-actors-when-spawning/504004/2 "2022-03-04T11:10:55Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/f/c4f758a32d27adb07e300651a0f91309410f6784.png)

Or, if they can get destroyed and you can have `up to 3` up and running:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/5/a756b5be45d6663572c8993b18081cd973b41722.png)

* * *

edit: The == has to be hooked up as well, updated the images.

---

<div class="post-metadata">

**Author:** ![rewhakki](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rewhakki/32/888178_2.png) [@rewhakki](https://forums.unrealengine.com/u/rewhakki)\
**Post date:** [March 4, 2022, 11:15am UTC](https://forums.unrealengine.com/t/how-to-limit-the-number-of-actors-when-spawning/504004/3 "2022-03-04T11:15:20Z")

</div>

Everything worked out. Many thanks!
