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"

Save and load bool variable / Open level questions

Hello. I have a menu created over the RealisticRendering template. So there are two buttons. The first will activate the "roomtour", the second will deactivate. So my idea was to save and load games to slot, to store the boolean variable which is activated when I click "roomtour on", and deactivated when I click "roomtour off". So the storing is easy, I made that already. My problem is, that I want to read those config file in another level / map. So I created the Load Game to slot script there (the level blueprint) and wanted to put this in the new bool variable which will activate the matinee example thing for the cameras. So it stores the variable, but in the new level, however the load function returns false, even the boolean variable in the other level stored as true. Here are my scripts / functions:

The main menu script (don't care about the move component things, its just decoration) alt text

My save boolean function: alt text

My get saved boolean function: alt text

The script in the Level Blueprint of the level thats going to be opened by OpenLevel: alt text

http://i.imgur.com/qcRFAMm.jpg

http://i.imgur.com/I5e0760.png

http://i.imgur.com/MrkpTxa.png

http://i.imgur.com/UFfFoGJ.png

Thanks for your help!!

Product Version: Not Selected
Tags:
more ▼

asked Aug 19 '14 at 04:10 PM in Blueprint Scripting

avatar image

iUltimateLP
188 17 28 36

avatar image iUltimateLP Aug 19 '14 at 05:29 PM

push

avatar image Ben Halliday STAFF Aug 19 '14 at 06:36 PM

Hey,

Can you show me what your Saver Blueprint looks like? You use the same name for Variables in different Blueprints, it looks like, and I'd like to try to duplicate your setup to reproduce this. Thanks!

avatar image iUltimateLP Aug 20 '14 at 06:52 AM

In my saver blueprint theres nothing, just two variables, the roomtour bool and the input_bool boolean.

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

1 answer: sort voted first

Hey Ultimate,

It looks like you're never changing the values of your Saver variables, so it's always saving your Roomtour variable in the Menu Blueprint as the default value of the Input Bool variable from the Saver. To make it easier to see what you're doing, I would recommend changing the names of the variables in your Saver to something like SvrInputBool and SvrRoomtour. Then it should be pretty clear what's happening; in both the Save Boolean and Get Saved Boolean functions, you're getting the Saver's variable (Input Bool and Roomtour, respectively) and setting the Menu's Roomtour with its value. Without anything updating the Saver's variables, that will always return whatever the default value for those variables is.

Hope that helps! Let me know if you have more questions.

more ▼

answered Aug 20 '14 at 08:59 PM

avatar image iUltimateLP Aug 21 '14 at 07:31 AM

Sorry, I'm pretty new in Blueprints. So how should I update the saver's variables?

avatar image Ben Halliday STAFF Aug 21 '14 at 04:18 PM

Something like this should work:

alt text

alt text

I de-cluttered the graphs a bit, but these are functionally the same. The only real difference is that I am saving the Saver's variable in the Save Boolean function rather than the Menu's variable. I named the Saver variable Svr Roomtour just make it clear which one I was using.

avatar image Ben Halliday STAFF Aug 21 '14 at 04:19 PM

And this is the Get Saved Boolean function cleaned up. This one is functionally the same as what you already had, so if you don't feel the need to change that one you shouldn't have to.

alt text

getsavedboolean.png (142.7 kB)
avatar image iUltimateLP Aug 21 '14 at 04:39 PM

Thanks Ben!! It works!

(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