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"

Saving complex puzzle game with Blueprint

Hi there, I know the system in Unreal with blueprint by using the node save game to slot etc. I watched some tutorials about it but it's still unclear to me since every tuto I watched shows the same. A simple store value for one actor into a slot/variable. My question is, I am currently developing a puzzle game in which a lot of object, light etc will be moving a lot. Do I have to store every single actor inside each different save slot with a different name? Or save all the same actor type inside an array ? Or does it exist an easier way to do it. I'm pretty noob in term of saving loading system. Also for loading, do I need to have in each actor a "begin play" that loads the position of the actor based on the save file?

Thanks a lot for your help. I m a bit confused here.

Product Version: UE 4.16
more ▼

asked Jun 06 '17 at 08:31 AM in Blueprint Scripting

avatar image

18 6 4 7

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

2 answers: sort voted first

You have to store all the required info to regenerate the world as is. For example, let us say you have 1000 cubes of size <1, 1, 1> in your world that you want to store. You have to write down 1000 vectors and rotators that you can use to spawn the actors where they used to be when you saved.

If each actor has a scale and a special mesh, then you have to find some way to encode the mesh, maybe as an index in a mesh array, and store that with the scale.

I hope this makes it a bit clearer.


more ▼

answered Jun 06 '17 at 08:36 AM

avatar image

2.7k 107 35 180

avatar image Bry55 Jun 06 '17 at 10:15 AM

But when do I store the vector of the cube. and then how do I tell that this specific vector stored is for this specific cube? That's where I m a bit lost

avatar image NoobsDeSroobs Jun 06 '17 at 10:18 AM

That is up to you. Just like you store that single float, you repeat it and store all the data. How that data is structured you decide and you have to write and read in a manner that agree on the structure of the data. FOr example, first you store an int telling you how many vectors there are, then that number of vectors follows. When that is done you read the name, size and other properties of your character. etc etc. You structure the data and you have to write code that writes and reads the data the correct way.

Once read you just spawn characters and actors and whatnot and set the correct values based on what you read.

avatar image Bry55 Jun 06 '17 at 11:05 AM

Ok I will give it a try. At the moment I m trying to store the vector of my cube into an array based on integer tag, then when I load the array, I m getting the vector based on the tag index based of the array, to try to get multiple vector and have a kind of "automatic array system" based just on the tag. Then when I add a new cube I always add +1 on the tag so it's saving a new array index. Kind of tedious but I might get it working

avatar image Bry55 Jun 06 '17 at 12:27 PM

That s a nightmare, I m trying many different ways, but I m a bit lost... I m doing it wrong, I never did saving before...! Here is what I m trying to work on just to test it if it works. alt text

saving.png (208.1 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Consider using a STRUCT stored inside a MAP of STRINGS. In my opinion, it's the best way to save and load data.

more ▼

answered Jun 22 '18 at 05:05 AM

avatar image

20 2 6

(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