Download

GameMode or GameState

Say I want to place 3 spawners in my level. I want to have some sort of central access to these spawners to control them.
My idea was: I add a blueprint variables called ‘number’, and I have them ‘register’ themselves on BeginPlay, so they are registered by their index.
First of all: is that a good way to do it?
Main question: would it make more sense to register them in the current game mode, or in the current game state? I’d like to hear your opinion about it, since there seems to be quite a bit of rationale for making these two classes.

Thanks for any info!

GameMode is for game rules. Not replicated, only server can access it. Used by the Server to handle incoming network connections.
Also used to setup different modes for specific levels but having different classes.

GameState is for the actual state of the current game. Is replicated, each client and server can access it. Is used to save the current
state of the game together with all ongoing overall events. You can access the PlayerArray in Multiplayer over it and in C++ it has
some cool GameStart functions.

For singleplayer it is not that dramatic to use the GameMode for such things, but i would recommend using the GameState for this.