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"

Score count not working right.

alt text Can some one explain what's the situation. The score saved in to game instance which works fine but when I play the game again it adds that score on to existing score saved in the game instance. So if previous score is 5 and in the next game I is 2 then in shows 7. I would like to stay 5 if the new score is less then 5 or 6 if the new score is higher. Do I need to save my Score saved hi first. Also when I wana restart the game I need the score to be saved. Can some one point in the right direction. These whole thing is pain in the A. Thank you!!!

alt text

Product Version: UE 4.15
Tags:
game-instance.jpg (629.8 kB)
game-instance-2.jpg (580.8 kB)
more ▼

asked Aug 13 '18 at 01:42 AM in Using UE4

avatar image

silverfish1000
124 12 23 29

avatar image Nebula Games Inc Aug 13 '18 at 06:05 PM

Not gonna lie, that entire set-up is odd/confusing. Not sure exactly what you are trying to do. Sounds like you need to actually "save" and "load" game data though if you want to keep a high score running. Also you said some confusing stuff like "The score saved in to game instance which works fine but when I play the game again it adds that score on to existing score saved in the game instance". The game instance doesn't "remember" anything once you exit the PIE, it only persists as long as you are continuously playing. So not sure what you mean by that.

avatar image silverfish1000 Aug 20 '18 at 02:17 AM

No worries I got it all figured out. How ever how do you save integer in the Game Instance that holds your score information with Game Save. Thank's Nebula.

avatar image Nebula Games Inc Aug 20 '18 at 02:28 AM

You need to create a save game object with the same variable you want to save as your game instance and pass that data to the save game object and pull it back out and set the game instance variable when you hit play again. Below is a link to a tutorial I made that shows you how to do this.

https://youtu.be/U9l9RL9ivw4

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

0 answers: sort voted first
Be the first one to answer this question
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