How do i switch levels, and them come back to exact location, when i switch back to the level

Hi in need to know how to make a level load when i hit trigger box . but the on the way back i want to be able to load the level at the exact location i left off at, say there are 2 sides to a town and you go out one way i need my player load at the right location when i come back through. But when the level reloads it always load at player start position. which could be far from the place i need him to be. Also I am making an JRpg, and when i go to the fight scene i need my player to load back to location he was before the fight started. if any one can help please let me know thanks.


Use a Game instance and make a Variable - Transform to hold that Data

You may also use a SaveGame class as you may not necessarily want this information to be passed on if the player dies or starts a new game. So this information could be stored in a .sav file for that purpose. But’s answer can achieve this also, depending on your needs. Just another option :slight_smile:

For example, you start the fight and the player position gets passed to the SaveGame . But if the player dies, the SaveGame doesn’t get saved and instead it loads the last saved slot with the appropriate variables(if the player chooses to try again).

Awesome thanks i will have to try that, havnt tryed messing with the saving part yet, hopefully i can figure out what u are talking about, i was wondering if you know how to access other player in the level using get player character node, it only seem to work for the main character. i need it to work for all characters so i can script the rest of my party members, I have a attack menu working for my main character but cant get the rest of them to move. i know there is a character index number, but dont know how to change it, or access it for other players.

If you want to possess other characters you can find information about that here
Though in your case I am not sure it would be the best course of action. If you want to switch main party members to travel through the world and act as your main character then this would be suitable. But for combat you may want to use a different approach. For instance, you could have the combat screen load actors based on your party members, and your main character send command to all these actors which would represent your party members. But your main character would be the only real character, making all the party member actors act.
The only character that you really need to control is the one navigating the world. Aside from that, all your party members could be actors. But like I said, this could be done in different ways depending on what exactly you are doing. And it could be a pretty complicated system to achieve, though you seem to be willing to make the efforts.

I actually figured it out, but i am having a bigger problem now, i have my whole system figured out but was spawning invisible actors to hit the characters and enemies, but now that i got my system, i have no way to make my character do more damage through out the game, my plan was to spawn my character , and his weapon would be in hand and it would hit the target, but i guess that doesnt work when he spawn he has no weapon in hand, any idea how to damage players across the screen. Im thinkin i could set up a matinee for each button to attack but im not very good with it yet.