# Set up a spawn system in c++

**URL:** <https://forums.unrealengine.com/t/set-up-a-spawn-system-in-c/40640>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 3, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/set-up-a-spawn-system-in-c/40640 "2015-09-03T20:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [September 3, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/set-up-a-spawn-system-in-c/40640/1 "2015-09-03T20:02:41Z")

</div>

So I have done a game in UDK where I had, in the Gamemode class, create an array, then create a class of each of the objects I would spawn in my dynamic array.

Now, in UE4, I know I have to use a Vector instead of the dynamic array, but my questions go here:

1-Do I have to create a class for each of the objects, then create the vector in the game mode that holds all classes as a vector?

2- If so, can anyone be kind in guide me how to do it?

Many thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [September 3, 2015, 10:54pm UTC](https://forums.unrealengine.com/t/set-up-a-spawn-system-in-c/40640/2 "2015-09-03T22:54:39Z")

</div>

You don’t use Vector, you use Unreals TArray type. No Standard Library stuff is used in UE4.

Have a look at ShooterGame as a good C++ Example, that or the Strategy Demo

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [September 4, 2015, 11:46am UTC](https://forums.unrealengine.com/t/set-up-a-spawn-system-in-c/40640/3 "2015-09-04T11:46:43Z")

</div>

Ok thank you!
