Get variable in another blueprint class

Hi!

I have some problem. I have in my “Level Blueprint” I have "When you press “H” you will spawn the actor called “MyCharacter”

And I take the “Return Value” for a pawn.
Now in my “Mycharacter” class I want to do is this :

I want to take the variable that I have in my “Level Blueprint Class” and take it. How can I make it?

Thanks a lot :wink:

You can’ do that without using C++, but you can make things other way around as you can access your character from level blueprint, so set varable inside character, or somehting more global like game mode.

Ok tanks you, I would like to you Blueprint for this, did I have no solution for solve this problem?
Thanks.

You can solve this like he said use game mode… here are the steps:

  1. Goto your Gamemode’s blueprint. If you’re using a default one, then make a new gamemode extending from whatever game mode you’re using. Let’s called this MyGameMode.
  2. Make a var for MySuperPawn let’s call this GlobalPawn.
  3. Go back to your level blueprint. After spawning add a node to get the Gamemode. After getting the gamemode pull the output node and create a “Cast to MyGameMode” node.
  4. Pull the output node and you should be able to see Get GlobalPawn.

This will be your MySuperPawn