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"

Save variables and Retrieve them on the go

So i have looked into many resources but some might have been good but doesn't work for what i need. I have a weather testing world that i need to save booleans for when an weather event is active. (Ex When rain's button is pushed to make it start raining it needs to save the true boolean. So then if you head over to another event and try to activate it is can call the rain's boolean and compare it to see if it can be activated.) I have save game and game instincts. But neither are holding the values and loading them back up when i need them too. Sincelry icy,

Product Version: UE 4.18
more ▼

asked May 18 '18 at 10:29 AM in Blueprint Scripting

avatar image

1 1

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

1 answer: sort voted first

The save game system can be tricky not because it's hard to use but because there is a tendency in new devs to try using them at the wrong times, like before an object exists, or after the variables have been cleared due to opening a new level.

I think to troubleshoot this, you'll need to show screenshots or code of what Events start the saving and loading to happen

more ▼

answered May 18 '18 at 05:48 PM

avatar image

3.7k 18 23 20

avatar image Nebula Games Inc May 18 '18 at 10:02 PM

Yep...screen shots

avatar image Icy-Quasar May 19 '18 at 05:12 AM

here's some screenshots.alt text

The Cloudburst-is the boolean i need to save during the game play- I have a function that pulls that boolean and set it to save boolean. alt text

So that is pulled in the actor right now but when i leave(end overlap) it stores in Cloudburst active or not. But when i overlap again it defaults back to false. alt text So what i'm trying to achieve is a way to store the Cloudburst (true or false) statement in a place to when no mater in that level i can pull its state and use that state in an argument to see if it can be activated or not.

Sincerely Icy.

widget.jpg (160.4 kB)
wigetfunction.jpg (32.0 kB)
wactorstorage.jpg (768.6 kB)
avatar image Nebula Games Inc May 19 '18 at 05:32 AM

I don't see anywhere that you either "save" data to the hard drive and load back up or where a variable is stored in the game instance which would persist between levels. The simplest thing to do us have these variables exist in the game instance and when you change them from a level or actor blueprint cast to game instance and change the variable. Then when you need to use them somewhere get the value from the game instance

avatar image Icy-Quasar May 19 '18 at 08:11 PM

I took out the game instance and save game to narrow down the problem and the screenshot above where what i was trying to save. So then i need to lean who to use game Instance and apply it here again in the proper way? I'll look in it again. Thanks Icy

avatar image Nebula Games Inc May 19 '18 at 08:19 PM

Yea we need to see how you attempted to save the data in order to help not just what you want to save

(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