Formation of characters

Hello,

I would like to make my own formation(Formation of Characters) manager class.
I am a bit struggling with UE4 terminology and designs:

I would like a formation to have a reference to its characters (it can be done with ‘TArray’ as I understand - also characters don’t have to be a direct “Children” of the formation (they can be a children of world I suppose - but I want to have a ‘tick()’ function inside the formation.
P.S.
(I don’t want a characters to move in a strict formation - I just want a formation class to be something like a brain of lets say 20 characters - something like a batch characters controller).

Normally in a “proper” Scene-Graph implementation engine I would just create a Scene-Node and make all the things there.
But in UE4 I am a bit stuck…

Should it be an Actor class ?
or something else? or maybe just a plain C++ class ?

You may want to take a second and go read the Intro to C++ Programming in UE4 page (specifically the “Gameplay Classes” section) as it gives a very good overview of the various common options for creating an Object/Class.

There is no wrong way to create an object. My first instinct is your Manager is probably just some UObject (you’ll need to add in some code to make it tickable, but there’s tons of examples of that in the code base) that has an array of UActors and simply drives their velocity each frame.

Don’t be afraid to just try something and tweak it later. The best way to learn (IMO) is by doing. You will make mistakes, but you’ll correct those mistakes and gain valuable experience.

Hello thanks for your answer - I already tried to make it with an “none” plain C++ class - but I already having some caviets with that, I didn’t find a way to make only a Uobject (I mean in a classes in editor) I will surely give it a try.
I am ok with C++ itself I just needed an advice like - you said with the Uobject.

But I am still not sure how to make an UObject :-(.
Initially I thought about making it as an AActor but I am not sure if I shall “Spawn”
this AActor or just to init with Constructor is OK ?

Also I want this to be a dynamic class - that will spawn formations on timer or some kind of it.

I suppose this was a part I missed

UCLASS()
class MyGCType : public UObject
{
    GENERATED_BODY()
};

Thank you! I will accept your answer!