How to add a "Hiscore" system to coin pickup?

Pretty self-explanatory, I just want to have a hiscore/record system with my coin pickups. Right now I can just keep track of how many I’ve picked up, thanks to various tutorials, but that really does no good unless I can keep track of records and hiscores. Any help is appreciated!

Also, forgot to mention, it’s a 2d sidescroller.

Do you tried to just make another interface panel to show the Highscore value which is loaded from a specific file or sever when your current value is less than highscore ? Important is just to save the highscore on death if you have beaten it. So main taks would be on death

Thank you for your answer! Here’s the thing, I’m really not the best at blueprinting, I usually need a tutorial for certain actions, would you happen to have any form of a tutorial? I could send you some screenshots of what I’ve got so far…

But I really appreciate it, this will basically complete my project!

He explains how to create the HUD,

use the Total Coins variable (which you should have created in your character) and call it on death like when he is dying on a rock, to put in from “total” to “highscore”. just branch before and check if total is > (greater than float/integer) highscore. On true write or save highscore

try to adapt this to your variables and blueprints

this needs to be in blueprint of obstacle

needs to be in YourPlayer Blueprint (DieCharacterDie is a “CustomEvent” you can name it as you want to)

You have no idea how much this helps, thank you so much! I will definetly begin working on this soon. Will you be around if I have any questions? I actually already followed that same tutorial for the coin pickup, so this will go by fast!

Ok, so I followed this directly, it didn’t seem to work… Any thoughts? You see, I have my character do this when/if he falls down a hole, also, when he does, it does show the “Coins:” But no number. I just copied exactly what you did in these blueprints, am I supposed to add anything? Like for the save game object rather than leave it blank? Or anything else?

Can you give a demonstration on how to adapt these to the blueprints I already have? I used the exact same way the guy did it in this video series. Basically, all I have is when you die, the music keeps playing and it just shows “Total coins” at the position I have it in during the gameplay, but it doesn’t have a number after it, so do I have to do some compiling of other blueprints with the “Highscore”(integer) variable?

Basically, I followed this tutorial completely for my stuff, so whatever you did, and if that worked, it should work for me, right? Or is there going to be a difference because mine is 2d?

I just showed you off the process in which order you have to call things. Which funtion you call depends on your classes objects and obstacles.
I dont know what is not working. you should start post your blueprint so everyone can give you hints or find issues and mistakes.

So you’re saying it should work with what I’ve done? I’m guessing it worked for you? Hmm… What do you think? I honestly just did exactly what the pictures show. So as for the pics, you say the first one needs to be in the obstacle blueprint, which for me it’s a hole, that kills my player on “on component overlap”, which is also set to “overlap pawn only”. Also, as for the second, by player blueprint, you mean the “2d sidescroller character” blueprint? Also, as for the save game thing, am I supposed to select a class? One last thing, am I supposed to do anything for the “highscore” variable? Other than create it and make it an integer?

Would it help restarting the engine?

So I just realized something, I had the box checked under the “check for life or something” node, however now it’s not doing anything now that it’s un-checked… :(… confusing. But thanks for stickin’ with me!

Dude,
You have to fill in all these little boxes!
This is not what will make your game, you have to make your game.
You started the right way by adapting the events. You have to continue this way through the whole images. The “little box” of that life check is a Branch (called if) an need a boolen imput to decide between true and false.

As is said this is just the ORDER to get your process working. You have to fill it with functions you want to check and do in your game.

Brain on game on :wink:

Alright, well thanks. If it’s too much, you totally don’t have to, but it’s a lot easier for me to follow an actually formated blueprint, rather than what I might need to add to my existing one, would it be too hard for you to make this in a 2d side scroller game mode? I’m REALLY not the best with blueprints.

Basically, here’s what I have. (It’s a long story about why I named certain things what they are, so you might not want to ask :slight_smile: ) How would you suggest to format this into what I already have?

so what is not working for you? is the widget not showing up, or does it not save an load the score ?
https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Blueprints/index.html

Nothing is working, basically when I die, I just see the “Mangled Bodies:” At the top, and no number after it. So when I die, I just see the awkward camera angle and the music keeps playing (which I like), and I also added a widget to appear so that I can restart the level. I just need to be able to save a highscore so it’s not completely pointless every time you play.

The “Mangled Bodies:” thing is just what I have while I’m playing, and the number increases as I collect the “coins”. Nothing is working from the blueprints.