Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!

Thank you!!!


Product Version: Not Selected
more ▼

asked May 08 '14 at 10:09 PM in Blueprint Scripting

avatar image

11 2 4 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.


Cheers, Nick

more ▼

answered May 08 '14 at 10:25 PM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image Laurence Oliphant May 08 '14 at 10:27 PM

Maybe some kind of global variable available?

avatar image Nick Darnell ♦♦ STAFF May 09 '14 at 12:13 PM

Not until the GameInstance exists, unless you want to write C++.

avatar image TheDuke May 09 '14 at 11:11 PM

Thanks Nick - Seems quite an arse just to continue the score from one level to the next! Ah well. Was a little too plane sailing up to now.

The Save Game stuff doesnt look very intuitive either. Ill give it a bash and see how it goes.

Laurence - yes, but what? Someone said data store on the blueprints live session today but I've no idea what they meant.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question