Download

Set up a spawn system in c++

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 :smiley:

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

Ok thank you!