How to create a High Score Table (saved)
I`m trying to create a game where you control a character running straight forward and dodging objects / picking up objects. I have a timer which counts down from 60, and at 0 I use "SetGamePaused" to stop the game and bring up the new widget, where I want a High Score Table to appear. The "score" is the amount of objects you have managed to pick up during the 60 seconds. I do have a pick-up system working where it does count every pick up and adds it to the view port when playing.
The problem is that I cant figure out how to bring the score into a "high score table", and even harder for me, is how to make it work like a high score table in the sense that it puts the highest score on top and so on.
Does anyone know any good tutorials to this, or does anyone know how to do it? Screenshots of blueprints is really helpful, as I am very new to Unreal Engine 4 and blueprints. (I have the basic knowledge only.)
I really hope someone has an answer for this, it would save my game! ;) (Also I know loads of people are wondering the same thing, as there arent many tutorials showing how to do exactly this, but only showing how to make a score and counter.)
asked Nov 01 '16 at 05:19 PM in Using UE4
in c++ you can sort arrays, but in blueprint its a bit trickier. if you have an array of Ints representing score, you can organize that array by copying the Max Int from the array, to another array, and removing it from the first array. keep doing this until the first array is empty, and if you want each score to have a name or a structure of data, those should go in a separate array that is kept in sync with the integer array. every time you copy over a score from the integer array, you should also copy over the name/data that corresponds to that score. so basically 4 arrays, copying from 1 pair into the other pair, keeping the score separate from the rest of the data so you can sort by it.
answered Nov 01 '16 at 11:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here