I’m late to this thread, but I can hopefully clear up some confusion on what you guys were experiencing with the game mode variable. When you make a variable in a blueprint of a basic type (like int, float, etc.) or of a struct, that variable represents one of those types, gets initialized to some default value, and you can get or set the value whenever you want. As an example, if you make an int variable, it’ll get a default value of zero if you don’t change it, and if you use the Get node on the variable, it’ll also be zero. When you make a variable that is of a type based off of “object” in the variable drop-down however (which the game mode is), the variable basically is acting as a “pointer” to a specific instance of an object of that type and its default value is to “point” to nothing until you tell it what its value should be.
This can be a bit of a confusing concept, but hopefully a simple example will make it clearer. Pretend we’re making a multiplayer game and for whatever reason we want our player to track which other character has damaged him last. To do that, we might make a variable of type “Character” in our blueprint who is always going to represent which character has done the most recent damage to the player. We don’t actually want this variable to create anything new (the other characters already exist!), we just want it to keep track of which existing character has done the most recent damage. Basically this variable will “point” to that character. When we first make the variable then, the default value is actually nothing at all. It’s not pointing to anything just yet, because we’ve not told it what you want it to point to. In the damage example, when the player takes damage, we’d then want to set the value of our variable to the character doing the damage, which would then make our variable point to that particular character and allow us to fetch it later with the Get node if we wanted.
This is basically why you were having problems with your game mode variable. The game mode is also based off of object, so when you make a game mode variable, it is also just a “pointer” to a particular instance of the game mode, which defaults to nothing until you point it to one. When you try to call blueprint nodes on an object variable that has nothing in it, you get the “access none” errors you were seeing. It’s basically telling you that you just tried to do some operation on a value that’s not filled in. The variable isn’t pointing to anything, so there’s nothing to actually do the operation on.
For game modes specifically, when you play your game, there is exactly one instance of the game mode created for you by the engine. The node you were calling “Get Game Mode” is explicitly returning you that particular instance, which is why it was valid to call operations on. Does this clear things up a little? I know this can be a little tricky to understand at first (and my super late night explanation might not be great). I can try to clarify some more when I’m slightly more awake if it’s still confusing :).