How can I pass data from one level to the next?
I have made 2 levels in a Breakout style game but can't seem to transfer the hiscore from the HUD to the second level. Both that and the number of lives left reset - how can i get this data to pass across from one level to the next...
Is it a save game thing?
I tried an interface output but got nowhere.
Ive a feeling when level 2 loads (when all bricks are destroyed in level one), I need to start this 2nd level with some code to let it know the score from level one. I did try Event Begin in the 2nd level Level BP and cast to the HUD to get the score but its all 0 now.
This seems like something that must be quite common i.e. moving on to a new level but preserving the score/lives so I'm hoping someone might know what the best way is!
Hey David, yeah that's a save game thing. Though in I think the 4.2 (or maybe 4.3) version we'll be adding a new GameInstance thing that lets you much more easily keep persisted data between level loads.
answered May 08 '14 at 10:25 PM
Nick Darnell ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here