Character save at save point
- supadupa64
- Posts: 200
- Joined: Sun Mar 06, 2016 9:40 pm
- Contact:
Character save at save point
I don't know if this is dialogue systems, but when I save my game the character always returns to the starting point of the game. Is there a way to make it so the character stay in the spot where the game was saved at?
Game I'm working on:
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
-
- Posts: 68
- Joined: Sun Aug 16, 2015 3:01 am
- Location: St. Louis, MO
- Contact:
Re: Character save at save point
Have you checked this out....
http://www.pixelcrushers.com/dialogue_s ... sitionData
I think the save / load demo does what you are asking. However, if you are using asynchronous loading for your open world game, this has potential to make that more complicated...at least it did when I was attempting something similar.
- Ron
http://www.pixelcrushers.com/dialogue_s ... sitionData
I think the save / load demo does what you are asking. However, if you are using asynchronous loading for your open world game, this has potential to make that more complicated...at least it did when I was attempting something similar.
- Ron
Re: Character save at save point
Thanks, Ron! That's exactly what you want to do.
Since Ruction has multiple levels, make sure to tick Record Current Level.
Since Ruction has multiple levels, make sure to tick Record Current Level.
- supadupa64
- Posts: 200
- Joined: Sun Mar 06, 2016 9:40 pm
- Contact:
Re: Character save at save point
Are we all talking about the same thing? I have stuff that gets saved in game, but I'm only taking about where the character spawns at on a loaded game. Each time I save the game that character always spawns at the starting point of the entire game and not in the spot where the game was saved at. Maybe I'm missing what you guys are saying.
Also, the game is one big scene and I took out multiple scene loads.
Also, the game is one big scene and I took out multiple scene loads.
Game I'm working on:
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Re: Character save at save point
I think we're talking about the same thing. When you add a Persistent Position Data component to your player GameObject, it will include the player's current position in saved game data. Then, when you load a saved game, it should move the player to that saved position.
When you save, the Console should have a debug line with something like:
Somewhere in that line, you should see something like:
where Position is the player's saved position.
When you save, the Console should have a debug line with something like:
Code: Select all
Dialogue System: Save data: <lots of stuff>
Code: Select all
Actor["Player"] = { Name="Player", IsPlayer=true, Position="1;2;3;4" }
-
- Posts: 68
- Joined: Sun Aug 16, 2015 3:01 am
- Location: St. Louis, MO
- Contact:
Re: Character save at save point
Yep I think we are all talking about the same thing! Just a heads up.....you might notice a "jump" or jitter when the script moves your player controller to the saved coordinates....don't worry this is just you seeing what it's supposed to be doing because it loads the player/data and then moves it to the saved coordinates
Either way, you'll want to hide this "jump" from people playing your game with your loading scene, fading-in from black or whatever is best for your game.
Either way, you'll want to hide this "jump" from people playing your game with your loading scene, fading-in from black or whatever is best for your game.
- supadupa64
- Posts: 200
- Joined: Sun Mar 06, 2016 9:40 pm
- Contact:
Re: Character save at save point
I don't have the Persistent Position Data component added to my player. I guess I missed that step along the way. I'll test it out.
Game I'm working on:
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
- supadupa64
- Posts: 200
- Joined: Sun Mar 06, 2016 9:40 pm
- Contact:
Re: Character save at save point
Ok, so nothing saves at all. In the UI it shows a saved game, but when you go to load it it just starts the game over from the beginning. Hmm
Game I'm working on:
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Re: Character save at save point
Did it used to save? If so, do you recall what changed in your project since then?
Are there any warnings or errors in the Console view?
Are there any warnings or errors in the Console view?
- supadupa64
- Posts: 200
- Joined: Sun Mar 06, 2016 9:40 pm
- Contact:
Re: Character save at save point
Actually I changed a couple things and I got the quest system to save. So if I'm on a certain task it saves, but the position does not. It actually never has. I added the Persistent Position Data to the player, but maybe something is blocking it?
Game I'm working on:
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/
Website: http://www.RuctionGames.com
Steam: http://store.steampowered.com/app/49682 ... en_Tablet/