I’ve been through a few save game tutorials, none of which seem to be working right for me. (Maybe i’m just not getting it right)
What I’m trying to achieve is having the player walk into a door, load a new level (the interior of the building) then hit the door from the inside to reload the original level and update the position to outside the door.
What I’m getting is a reset to the player start original position of the map. I’ve tried multiple ways of using the actor location saved to the save game blueprint, the character blueprint and even through level blueprint (didn’t expect that one to work anyway).
Is there something I’m missing or is the tutorials available not explaining actor location change on map return?
What you need to do is create a blueprint involving the object you interact with and have that save the position to your character of the door you intend to go to I.E. if you want to walk into building A, the door that loads the level should have the transform vector that the player intends to spawn on. For instance make a parent class of a door. Use a bp interface with a transform return value so that your character can communicate to your door. use a raycast to initiate the contact with the actor and send an interface message to that actor that was hit. inside of your door bp have it return a transform variable that has the spawn point you want the character to spawn at when the next level loads. then inside of your character bp retrieve that transform variable, set a local transform variable for safe keeping, then go through the save game shindig to save that transform function. last thing to do is on event begin play inside of your character just have it check for the save file and if it is valid to get the transform variable from it and then using a teleport node set the characters new location.
I have some screenshots that can help you if youd like, im also trying to get a big heap of essential code up on the market place soon that has pretty much everything you need from save game, array systems, inventories, menus, ai, crafting, all the works for a plethora of game genres