Master mind object


In the fizz_buzz example there is a note that says:

The Master class is a good starting point to add initial code for most projects.

But it doesn’t say why. Would I use it as a game controller (i.e. there is only one per level) or is there another use that I’m missing? In the “Who Pulls the Strings” post, it says (referring to the Master mind): It generally acts as the main container for an entire project. This then, seems to invalidate the game controller concept. Based on the tutorials, there doesn’t seem to be any reason to use Mind or Master in a level unless by “container” it means that it is simply a class where you put a bunch of coroutines but I still don’t see why these coroutines wouldn’t be attached to the Actor that they are controlling. What am I missing?


Keep in mind that :sk: was originally designed to be game engine agnostic. While the architecture of :ue4: is geared towards the game flow of multiplayer games like Unreal Tournament.

You’re right that in :ue4: we have a few high-level classes that can be used as global game containers, from GameInstance to PlayerController to GameMode depending on what you need replicated and available to other players in the world.

I’ve always used mind actors, where you attach a mind to an actor and then control the life of the mind with that actor. There isn’t a right or wrong way to use or not use Minds, they are just another place to put some global variables, methods and coroutines and a way to help make your game architecture more manageable.

Something I’ve often thought about regarding minds is the ability to spawn certain enemies or projectiles on certain minds, like a mind for rock-paper-scissors. Then an ability could slow down all of the rock mind objects by having that mind change its timestep method. Also digging deeper into :sk: I see how a crazy enterprising person could actually map Minds to threads and carefully split up workload that way.


@error454 Thanks. That’s a different way of thinking about it, but now that I’ve read your post, using the Mind class feels more intuitive.

As you can have more than one :sk: components in a blueprint, is there a discovery process where they could find each other? Effectively, could Mind control other behaviours in the blueprint?

One Mind to control them all, and in the blueprint bind them (so to speak)


:rofl::joy: nice :slight_smile:

There isn’t a way to get the instantiator of a Mind directly. However, if you have a SkookumScriptMindComponent on an actor, you could always call a custom SetOwner type of method on game starts that would let the Mind know who created him.