Saving variables in a seperate BP

Hey, I’m trying to save variables in a separate BP. My aim is to have a bool in one BP and then use it in the level BP to determine whether I have picked up a sword. My issue is that I can’t seem to do this is there something I’m missing?

the separate BP is so I can save the variables so I thought if I stick all the variables in one BP then it would make it easier and would only have to call it once per save.

I’m very new to this so it’s 900% my bad haha :slight_smile:

In order to call functions or access variables of an Actor or Object you will need to have a reference to it. There are multiple ways to do this and the correct one will depend on your specific scenario.

For example, if you want to access your character you could use node GetPlayerCharacter; if it’s something present in your level before you start play (i.e. you’re not spawning it a runtime) you can select that Actor then right click on the graph in you Level Blueprint and choose Create a reference to XXXX

For more information about Blueprint communication I strongly recommend watching this tutorial:

Training Stream Training Blueprint Communications with Zak Parrish

Hi ojl10, if i am understanding correctly, and the character is picking up a sword which activates a bool, then this is my suggestions:

Put the bool in the character Blueprint, and have it saved there. Generally I have all of my variables saved where they are targeted for the easiest use of them, so I don’t have to use as many casts. So when the character picks up the sword, it will set that bool to true.