Simple blueprint communication wont work

Hello, so here is my issue.

I’m trying to simply print the status of a Boolean variable from one blueprint that exists in another blueprint.

I have 2 blueprints, lets call them blueprint #1 and blueprint #2.

Blueprint #1 is a Game Mode blueprint and has been set as the ‘Game Mode Override’ option in the world settings. It has a single Boolean variable within it called ‘Test Bool’.

Blueprint #2 is an actor blueprint. It also has a single variable, an actor named Targetblueprint. Targetblueprint has been set to reference blueprint #1. This is how I intend find ‘Test Bool’.
As well as this variable, blueprint #2 also has several graph nodes in place. Firstly it ‘Gets’ the Targetblueprint’ variable; from that it targets the ‘Test Bool’ Boolean from blueprint #1; and then finally it prints the status of ‘Test Bool’ to a string.

Every time I run the game I get this error: Error Accessed None ‘Targetblueprint’ from node Construction Script in blueprint 2

This is an extremely simple and basic form of blueprint communication and yet I simply cannot figure it out.

Thanks. I appreciate any help I can get.

Below you’ll find a screenshot of blueprint #1, it contains the details of the ‘Test Bool’ variable.

Below that you’ll find a screenshot of blueprint #2. It contains the details of the 'Targetblueprint actor variable. It also shows the reference to TargetBlueprint, to the ‘Test Bool’ and printing to a string.

Your issue is that you only created a variable of the type of the GameMode-Blueprint, but you did not assign anything to it. Since for such variables there is no clear “default value” (as it would be the case with for example 0.00 for a float), the variable is “empty”. That is why it complains.

To solve this you could use a Get GameMode node instead and Cast it to your GameMode class. Alternatively you could create a BluePrint interface with a function that has a bool output, add the interface to your GameMode class, set up the function output as the variable you want and then cast the GameMode to that Blueprint Interface and call it’s retrieval function instead.

There might be other options but those are the 2 I know…

a) Get GameMode => Cast to YourGameModeclass => Get TestBool


b) Get GameMode => Cast to Interface Class => InterfaceFunction

I think what you want is this:

This worked perfectly thank you.
(Even though your solution is exactly right, I accepted the other guys post as the answer as it has a screenshot which is often easier to follow for anyone else who has this problem).

This worked perfectly thank you.