Download

Bringing a variable into a blueprint from another blueprint?

I need some help. I’ve created a variable called “SaveLocation” and I’m trying to get it while in another blueprint. I’m able to, but I’m obviously doing something wrong. I feel like this should be something easy, but I’m having quite a bit of trouble with it. Any help would be appreciated.

Thanks.

you need a reference variable into that cast. i dont know how your game works so its hard to say how to get the reference into this. but a reference is basically a direct connection to a specific bp

e705c8cf8f7c389c9dc3a524829f8dd5107ea5f9.jpeg
I tried using a reference variable as suggested, but something isn’t right.

All I’m really trying to do is save my game location to a file, and then when I hit a checkpoint and die, have my character respawn at my checkpoint using the file. The whole system already works. But this is the problem:

I have “Save Game to Slot” located in a blueprint called “BP_Checkpoint.”
I have “Load Game from Slot” located in a blueprint called “BP_Scott.”

Now if where it says Slot Name I type in something like SaveLocation, it works just fine. But that’s not what I want. I want to use a variable for my save file instead.

Okay, so I realized I didn’t need to cast. I’m not getting any compile errors now, but it’s still not working.

Here are two photos of what I have when it works. But instead of just entering a slot name, I want to use custom variables.
I realized I need to set my variable instead of getting, but I’m still unable to pull my variable into my another blueprint.

5eec271d93eb0eed7e0e9a719cdc9e1ac8dba9d5.jpeg

Looks like your passing a reference to a saved game which is not on the other client because the are not generating the save.

Wouldn’t you want to instead passing the save reference pass a command telling the other player to call the same save function. Essential if this is a check point. Instead of the save affecting the player who touches it, it affects all of the same class to save game at that point.