# Limit the number of placed actors on the level

**URL:** <https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207>\
**Category:** World Creation\
**Tags:** actor, limitation, unreal-engine, level, editor, question\
**Created:** [April 2, 2020, 2:57pm UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207 "2020-04-02T14:57:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![G\_juanjo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@G\_juanjo](https://forums.unrealengine.com/u/G_juanjo)\
**Post date:** [April 2, 2020, 2:57pm UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/1 "2020-04-02T14:57:07Z")

</div>

Hi! is there any way to limit the number of placed of actors in the level? For example you can only place a Specific enemy per level.  
Thank you!

---

<div class="post-metadata">

**Author:** ![mrteuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrteuy](https://forums.unrealengine.com/u/mrteuy)\
**Post date:** [April 3, 2020, 3:31am UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/2 "2020-04-03T03:31:50Z")

</div>

Create a “director” class that manages the list of actors. Need one - ask the actor to spawn one, if it’s got room. When one dies, remove it from the list via the director. Simplest way that I do in my games.

---

<div class="post-metadata">

**Author:** ![G\_juanjo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@G\_juanjo](https://forums.unrealengine.com/u/G_juanjo)\
**Post date:** [April 3, 2020, 10:32am UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/3 "2020-04-03T10:32:25Z")

</div>

And there is a way to make it via editor only? like a option or something?

---

<div class="post-metadata">

**Author:** ![mrteuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrteuy](https://forums.unrealengine.com/u/mrteuy)\
**Post date:** [April 4, 2020, 1:04am UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/4 "2020-04-04T01:04:29Z")

</div>

I’m not sure what you mean by editor only. If you were to create an actor that accepts generic object types (other actors, ie) as an input, it can manage the collection for you. I use one specifically for mobs (monsters), one for triggers, etc.

---

<div class="post-metadata">

**Author:** ![G\_juanjo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@G\_juanjo](https://forums.unrealengine.com/u/G_juanjo)\
**Post date:** [April 4, 2020, 10:51pm UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/5 "2020-04-04T22:51:05Z")

</div>

With editor i mean something like this.

![299110-ezgifcom-video-to-gif.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/3/7835df0a196bc7c85e09d6dc3c98f654c3f487c9.gif)

As you can see on the gif i can place many walls but is there a way to limit this?  
Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![mrteuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrteuy](https://forums.unrealengine.com/u/mrteuy)\
**Post date:** [April 6, 2020, 1:56am UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/6 "2020-04-06T01:56:25Z")

</div>

I see what you’re saying now. In the editor, I’m not aware of limiting static meshes without some C++ wizardry. You can, however, create wall actor objects and then manage them through globally to kill more than (x) # of instances. Even in the actor construction script, create a kill function if the # of instances is too high (this would tax the editor though, updating each time an actor of that type is “touched”), but if small enough a project, may work.

---

<div class="post-metadata">

**Author:** ![G\_juanjo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@G\_juanjo](https://forums.unrealengine.com/u/G_juanjo)\
**Post date:** [April 7, 2020, 3:15pm UTC](https://forums.unrealengine.com/t/limit-the-number-of-placed-actors-on-the-level/463207/7 "2020-04-07T15:15:09Z")

</div>

I will try! thank you!
