I have a Actor_BP that allows me to set a mesh and pickup/ drop an object but I want to save the location of multiple objects without having to have a new blueprint for each object I want to move. I currently have a save system that works when there’s only instance of the BP in the level. I’ve set my Vector Variables to Vector Arrays but I cant’ figure out how to set each Instance of the object’s world location Independently. At the moment I load the save and all objects Spawn at the 1 saved vector and get launched into the air. I’ve look at documentation but I still cant piece it together.
The screenshots show my Save/Load Custom Events in the Pickup Objects Actor_BP
In your example, where are you setting the location of the item for the array? At first I kept it in my ‘Pickup Items BP’ where it sets a Vector Array in my Game Instance which then set and saves another Vector Array in my save game. I then added the spawn actor portion to my level BP but It doesn’t seem to be setting any locations. I’m pretty that I’m just not setting the actor location in the right spot. Maybe I’m misunderstanding but I tried to set to actor location and add it to the array from my Level BP but I’m not sure how I’m suppose to get a reference to the Pickup Item BP in the level to get the location. I also created a empty actor in my level but I run into the same issue getting a reference to the items.
Right, do this in the level BP. ( I don’t know exactly what your slot name and actor names etc are, but you’ll get the idea ). First of all you need an easy way to get a reference to the save game:
I’m getting the same errors using the keys
Edit: I put some print strings at the end of both custom events. My loading event doesn’t pass the for each loop
No idea I’m afraid. All I know is, it works fine here.
I can only suggest making sure absolutely nothing else is running and doing stuff to the save game.
When you get it working you need to a CLEAR on the save to the array, otherwise it gradually builds up a massive list of all the places the actors ever were
Your comment about there being nothing else running the save game gave me an idea. I have the save set on my game instance for my characters variables so I put the save portion into the game instance and it works If I load the game without restart the level with the exception that the previous Item stay in the world. but when I load the level it forgets the location and just resets to the default location.
Game instance isn’t persistent between loads, that’s what it’s for. So stuff you put in the game instance will not exist after you exit the game a reload.
I had another idea. Just make a new level, nothing going on except the grey platform. Put the code I gave you in the level BP.
Only trigger it with the keyboard.
PS: This is what happens when you don’t clear the array
( Started as 3 cubes… )
Also, if you fresh level idea doesn’t work, you can try a new project, that will DEFFO.