How to unlock the next level using a condition?

Hey everyone, I’ve ran into a bit of a problem. I’m trying to make an unlock system in my endless runner game where clicking the play button on the next level widget screen performs a check. Most of the functionality works, but I can’t get one of the bool values to save that a check will be performed against. Initially, a bool value is set to 0 in the save game blueprint, which is what is checked against with a branch, so when you click play on the next level, it will use the false branch and display an unlock screen. Here, if both conditions are met (both high score and gems), then the “yes” button will be enabled. If not, it won’t. Then, when “yes” is clicked, I want to set the bool value to true, and subtract the amount of gems from the player’s current total, set that as the new total, and save those values to the player save. Then, the unlock screen is removed, and what’s supposed to happen is when you click play again, the bool condition should be true now and allow you to play the level. However, none of the gems are being subtracted, and the bool value remains the same, making it so the unlock screen keeps coming up. I’ve got some screenshots of the setup. I’ve tried the check a few different ways, but the same problem pops up. I’m not sure what I’m doing wrong? (The naming on the bool value is a bit off, I’ve been trying different ways to get this working so I’ve changed the name a few times)

Thanks in advance!

Hey,
In the last screenshot, shouldn’t save game object be set to something? It looks like you just didn’t save anything there.

Sigh xD I can’t believe I just missed hooking up that one node. I tried as many ways to get that to work as I could think of, and completely forgot to actually save the game. Thanks man!

No problem, always happy to help. Believe me I made the same mistake many times. Now I always double/triple check everything. If you would be kind enough to mark it as resolved. Happy coding! :slight_smile: