Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Files

Previews only

Unreal Engine 4 Tutorial - Save Points Part 5: Save Player Data

In this series we are setting up a save point system where the player can save and load into a game via save point locations in their game. In Part 5 we finish things up by going over how to handle saving certain pieces of data. SUPPORT ME Patreon I https://www.patreon.com/ryanlaley Buy Me a Coffee I buymeacoffee.com/RyanLaley Donations I paypal.me/ryanlaley PRIVATE 1-2-1 SESSIONS Email me at support@ryanlaley.com for more information and rates, or visit http://www.ryanlaley.com/learn-games-development/ JOIN THE COMMUNITY Discord I https://discord.gg/TcPtCBp FOLLOW ME Twitter I https://www.twitter.com/RyanLaley Facebook I https://www.facebook.com/RyanLaleyGames Instagram I https://www.instagram.com/RyanLaleyGames

Comments

Anonymous

And here it is again. Did something, did not show how ... like everything is simple, figure it out yourself. And that just doesn't work. In my case, the level and gold variables are not being saved. Maybe I didn't understand something, but that's why I signed up for the lessons. And I expected an explanation of everything the teacher does. It can be seen that you have created new functions in the project without a video demonstration ...

ryanlaley

the player level saving was covered, the gold is exact same as that. Saving data is covered in numerous other videos i have made in greater detail. Every game is going to want to save different data so its not going to be possible to show every iteration. Instead I show in the saving game videos generically what you have to do. Here I am showing how to trigger the save point to save transfer the information to and from the player/map ultimately, to save any variable you must copy the variable into the save game object. and then when loading you copy it back. I recommend watching the saving and loading videos i did to get a basic foundation learning of how the save system works in unreal

VaSh

I've watched this whole series now, but I haven't followed along in editor. I'm a little worried though because you use the level name as the slot name for the level data, but you have a user-provided string for the game save slot name... so when you pick up all the loot, save your game, then start a new game, all the loot will be gone from the level? That's not right :S Shouldn't the level data use some combination of the game save slot name and the level name to make a level save slot name?

ryanlaley

Good catch. Yes that will be an issue. I will record a part 6 this week demonstrating the solution. But yes, you combine the level save name and level name for the level save data. Then you can split the string name up to get the correct one on load.