You need to create your save game object blueprint with the variables you want to save. When you create your save game object, select the blueprint you made under the save game class. Then set the variables in the save game var by dragging of of it and selecting the var/array you want to save.
So what James94Hodges is saying is: create a new blueprint MySaveGame that inherits from SaveGame:
Add your save variables to MySaveGame, in your case an array of positions and rotations.
Then in your Create Save Game Object node, select the MySaveGame class you just created. Cast the created object to MySaveGame. Now you can modify your save variables (your positions and rotations). When you’re done, write it to disk by passing it to a Save Game to Slot node. To load the data from disk, use a Load Game from Slot node and cast to loaded object to a MySaveGame.
now I got stuck while loading the Data, and placing the meshes back into the level - (shouldn’t i create another array for the mesh-type while saving?)
I have no idea how to print an Array :D, but i looked into the Log, and it said this when i tried to load:
LogArray:Warning: Attempted to get an item from array PositionsForSave out of bounds [2/1]!
LogArray:Warning: Attempted to get an item from array PositionsForSave out of bounds [2/1]!
Can anyone tell me whats wrong? (i know that “new function 0” has no target, this is because i have no clue what is going on, and i forgot to put them together after i messed around with them) http://www11.pic-upload.de/10.07.15/myk2899y7m4i.jpg
Maybe someone can show me a working save-function for static meshes?
Thank you!
Well, you have 1 very big mistake. When you press L, you should only spawn 1 actor, and then you need to add all of the static meshes. Can you post your BP where you create your static meshes, I need to know how many components you are creating, and if you are using static meshes or instanced static mesh components.
I should be done getting the save function finished, but quick question, can players rotate blocks? Scale blocks? Or can they just place them, and the scale and rotation are always the same?
only rotate (around every axis), no scaling. [Rotate: Q,E,R,F-Keys, and there should be a reset-key xD, i think it is T? - just if you want to try it out.]
Saving the player position too would be nice - but i am asking for too much. (since that is not TOO complicated :D)
Shouldn’t be a problem, just give me a few minutes to run some tests. Personally I have never dealt with loading and saving, so it may take me a bit longer.