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"

How to render my saved variable?

hey, i want to render the score u got in an other level. So i created the game instance. everything works till there! Then i wanted to save the values of the variable "max (player)score". the max score is ur highscore. And when i reopen this game it should show u ur highscore again. But it tells me all times an error about the return node of the function, which is binded by the Text. alt text

alt text

Product Version: UE 4.21
Tags:
unbenannt1.png (186.2 kB)
unbenannt1.png (186.2 kB)
unbenannt2.png (332.6 kB)
more ▼

asked Feb 24 '19 at 09:04 PM in Using UE4

avatar image

Unreal Kort
12 3 1 5

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

1 answer: sort voted first

Check how you set your «save ref» variable. You try to push a «create save game object» on false and you use the return value directly after, but if the save game object exist you still try to take the return value from your «create save game object» which obviously doesn't exist.

So in resume, make sure to use «load save game from slot» if the game actually exist.

Also the value you take from the game instance «You was in game» will always be by value by default (so if it's set true, the game will always run the true branch output are vice-versa).

more ▼

answered Feb 24 '19 at 09:15 PM

avatar image

Xosh project
361 3 6 15

avatar image Unreal Kort Feb 24 '19 at 10:07 PM

firstly thanks for the fast answer.

i changed a bit the nodes.

alt text

if i start the game the first time, it does not load or save. if i finished a round it creates a save game object If i reopen the complete game it load game from slot, if i allready played a round

everything fine!

But if i have to save the game the second time i really dont know if it works. i think this is what i can solve by myself maybe. the only big problem is that i have to know how i can remove the errors what appear every time i start the game. it doesnt deppends when i come to the menu

unbenannt3.png (293.3 kB)
avatar image RimmyD Feb 24 '19 at 11:04 PM

The errors are because your main menu has a text property trying to read from the save game before it exists. Put a isValid before you try to read the property

avatar image Unreal Kort Feb 24 '19 at 11:28 PM

ah ok thanks

avatar image Unreal Kort Feb 24 '19 at 10:17 PM

ah ok, i understand now what u mean, wait a bit...

avatar image Unreal Kort Feb 24 '19 at 10:35 PM

ok, i dont get it, it feels like i need a "get all save game objects" function. Im looking for a tutorial. I understood the normal tutorials for save/load like this https://www.youtube.com/watch?v=LpMGm8pNN9E But this is a bit different

avatar image Unreal Kort Feb 25 '19 at 04:55 PM

ok solved now

(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