x

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"

HUD is not printing Text while playing the game

I have implemented Save & Load High Score just like this turotial:

https://www.youtube.com/watch?v=6l7uynUwm5M

But I'm trying to print the High Score while playing the game. I created function everything is fine. But High Score prints when my character died, after death operations.

Is it some kind of lock mechanism on "Save File" (you can't read while some other function is accessing same file) or I'm doing something wrong?

Here is my HUD Screenshot: alt text

Product Version: Not Selected
Tags:
unreal.png (115.1 kB)
more ▼

asked May 18 '15 at 07:12 AM in Blueprint Scripting

avatar image

yogesh_gamer
75 23 19 24

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

1 answer: sort voted first

You have to save changes to your savefile. Different to variables it will only change once it's saved. The performance is good enough though to easily do this in real time without serious penalties.

So just save your savegame object everytime you change the variable and it should work.

Cheers.

more ▼

answered May 18 '15 at 03:16 PM

avatar image

Erasio
6k 291 86 293

avatar image yogesh_gamer May 18 '15 at 03:36 PM

I'm saving my high score after beating previous high score only or if there is no save file is present.

And I'm performing this operation after death of my character.

Then why it doesn't show high score in middle of game?

avatar image Erasio May 18 '15 at 04:15 PM

Honestly. I am not entirely sure.

Whenever you work with savegames you should always load it when you want to read a value (like directly before you read it) and save it right after every change you do. That way it always worked for me.

avatar image yogesh_gamer May 18 '15 at 04:18 PM

I'm displaying it on HUD or should I say UMG. It display score correctly but after death. Sounds weird.

And I'm not trying to access it anywhere else. Just after death update High Score if player set new record.

avatar image Erasio May 18 '15 at 04:25 PM

Ok now I have no idea what you're talking about...

If you just use "Load Savegame" whenever you check the variable you should always have current and accurate value. Try to work less with the reference to a savegame object. If you meant something else I did not understand it.

avatar image yogesh_gamer May 18 '15 at 04:59 PM

Maybe this screenshot may help you to understand. I'm just getting and displaying High Score on UMG. alt text

unreal.png (113.6 kB)
avatar image Erasio May 18 '15 at 05:06 PM

I did see this picture in your start post.

You are using a savegame right? They maybe try to not use the reference from your "RunCharacter" but instead load it new with the "Load Game from Slot".

avatar image yogesh_gamer May 20 '15 at 05:33 AM

Thanks. I got it working. Here is Screenshot: alt text

unreal.png (93.0 kB)
(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