Save And Load Player Stats - Unreal Engine Tutorial

  Рет қаралды 38,281

Matt Aspland

Matt Aspland

Күн бұрын

Hey guys, in today's video, I'm going to be showing you how to set up a save and load system, this one is for player stats, however it can be used for whatever you want.
#Ue4 #UnrealEngine4 #Ue4Tutorial
___________________________________________________________________________
00:00 - Intro
00:17 - Overview
01:19 - Setting Up
03:13 - Saving
08:59 - Loading
12:07 - Final Overview
12:26 - Outro
___________________________________________________________________________
My Public Video List: trello.com/b/7vJgXzBm
My Patreon Page: / mattaspland
Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
The Basics Of Nodes Playlist: • The Basics Of Nodes In...
Blender Tutorials Playlist: • Blender Tutorials
___________________________________________________________________________
If you enjoy make sure to subscribe: / @mattaspland
Join My Discord Server: / discord
Follow Me On Instagram: / matt_aspland_
All My Social Media Links: linktr.ee/MattAspland
___________________________________________________________________________
If you want to support me, you can PayPal me at "matt.aspland.1@gmail.com". This is by no means expected or required. It is just a nice support :)
My Patreon Page: / mattaspland
Link to PayPal: www.paypal.com/
You can also support me on Ko-Fi following this link: ko-fi.com/mattaspland
Thank you :)
___________________________________________________________________________
♫Music By♫
●Kronicle - Chill Noons
●Soundcloud - / the-chemist-10

Пікірлер: 99
@MattAspland
@MattAspland 2 жыл бұрын
Sorry if my voice sounds a little different in some parts of the video, I'm starting to feel a little under the weather, hopefully it doesn't last too long lol
@applejetgg
@applejetgg 2 жыл бұрын
lol
@fleurbird
@fleurbird 2 жыл бұрын
Aww, don't apologize for that. Hope you're better soon.
@N37h4ka
@N37h4ka 2 жыл бұрын
Sorry to here that BTW you dont need to apologize for that anyway hope you get better soon 🤗🤗
@varunkatara575
@varunkatara575 2 жыл бұрын
2
@greenguy8612
@greenguy8612 6 ай бұрын
That would be the ricin that i gave you
@IoSkyBoyoI
@IoSkyBoyoI Ай бұрын
I've been through so many tutorials for silly hours on more complicated tutorials for more advanced systems....and honestly I come back to this tutorial and build from this into a complicated system. There's just something about the way It's shown or explained that makes sense, And allows me to build complicated save systems from it. Thanks for making this.
@fleurbird
@fleurbird 2 жыл бұрын
The local variable inside a function is what I've learned from this. Great tutorial as always
@MattAspland
@MattAspland 2 жыл бұрын
Amazing, always great to learn something new :)
@MISSGNOMETF2
@MISSGNOMETF2 Жыл бұрын
2 years of trying to make games and NOW i finally got saving into one, thanks m8 :D
@Asmund648
@Asmund648 2 жыл бұрын
Yesss, a much needed topic finally explained in a proper way :D
@kj25
@kj25 2 жыл бұрын
As always
@MattAspland
@MattAspland 2 жыл бұрын
Always a pleasure Asmund! :)
@makeitunreal6057
@makeitunreal6057 Жыл бұрын
This is one of your best tutorials!
@wichitazombie1773
@wichitazombie1773 2 жыл бұрын
you are a god send, you wont make me go watch an hours worth of videos just to come back to this one to understand it. You are a real one my guy!
@MattAspland
@MattAspland 2 жыл бұрын
Thank you so much for the kind words man, super happy I could help you :)
@yazzindev
@yazzindev Жыл бұрын
Thank you Matt! I don't know how many hours you saved me but.. they're a lot! Thank you so so so much!
@w_graphicsfr
@w_graphicsfr 2 ай бұрын
ironic 😂
@JKordero
@JKordero 2 жыл бұрын
Nicely done! thank you!
@studiodenne
@studiodenne 7 ай бұрын
Thank you for this nice tutorial!!! Get it still nice working, Iám so happy
@stevenwynn819
@stevenwynn819 2 жыл бұрын
Nice video. Hope you're feeling better.
@unrealencin9132
@unrealencin9132 2 жыл бұрын
Matt, Your The Best Tutorial Channel.
@REACH_khbk
@REACH_khbk 2 жыл бұрын
Great tutorial as always! Can you possibly do a compilation tutorial when you get back from holidays which covers how to make all of these save/load things work from within a widget? I'm trying to set up a save/load button on a menu and having trouble getting actor transform in order to save/load the player's location as well as level! I assume this is because I'm not working within the third Person BP for it. Thanks so much and have a lovely break!
@langsungintinya6191
@langsungintinya6191 Жыл бұрын
thanks, you save my life, this is i need
@TFx2TV
@TFx2TV Жыл бұрын
Awesome cheers Matt
@BeamFreqGames
@BeamFreqGames 10 ай бұрын
Well, once again, your skills have been useful and inspiring. If Stan Lee hadn't passed away, he may have made you his next superhero. Captain Unreal. LOL. God bless.
@ProjectRelease
@ProjectRelease 2 жыл бұрын
I had an issue where the game did not register the save game to slot. A stupid mistake but I instantly promoted my Slot Name to a variable without setting a default value @ 8:12 So for anyone with a similar issue, make sure your string variable has a default name!
@gamedeviitian3645
@gamedeviitian3645 2 жыл бұрын
😂😂ah same issue , take me 2 hour to solve this , after i know i am dumb
@omnianima4540
@omnianima4540 2 жыл бұрын
Lmaooo thank you for writing this, it helped me realize I completely forgot to "save game to slot" in first place, I was like man how tf does this string magically work without slot, anywhere
@irnuska2409
@irnuska2409 2 жыл бұрын
THANK YOU! Omg it actually finally works, being hunting what is wrong with my code 😂
@sourcebyte8039
@sourcebyte8039 Жыл бұрын
Thank you!
@FreQtik
@FreQtik Жыл бұрын
Thank You!
@netanel8334
@netanel8334 2 жыл бұрын
thank you!
@g-dojjo
@g-dojjo 2 жыл бұрын
Thanks broo!! im really hate save and load somethings in unreal its giving me a headache :D
@MattAspland
@MattAspland 2 жыл бұрын
Always a pleasure man, hope this helped :)
@g-dojjo
@g-dojjo 2 жыл бұрын
@@MattAspland yeah your tutorials always help me bro thanks for everything ^^
@TinoPlusUltra
@TinoPlusUltra 10 ай бұрын
so this method works really well. My only issue is trying to find a way to implement this in a new game and continue game type of setup. It defaults to always load the previous save.
@WilliamDaviesDev
@WilliamDaviesDev 6 ай бұрын
tysm!
@StarCats
@StarCats 2 жыл бұрын
Hello Matt, your videos really help me a lot. Thank you. Can you take a video about mobile scale UI? Widget UI and viewport / mobile in different scales. thank you.
@MagimanD
@MagimanD 8 ай бұрын
Hey man great tutorial as always, got a small bug for some reason when I hit P again is saving my the last button I hit in the menu
@superSamioo
@superSamioo 2 жыл бұрын
Can you please make a tutorial on saving graphics settings
@afirocks100
@afirocks100 9 ай бұрын
Awesome tutorial! I just ran into an issue and it would be amazing if you could help me out with this. Im using a loadout system in my game where i save the guns that i want the player to spawn with, and this works perfectly if i play single player. The issue comes when i have two different players in the same match, the client loads the guns that the server host saved. Any idea how I can fix this?
@michaelkukula5926
@michaelkukula5926 9 ай бұрын
If I have a blueprint in the level that changes the material of an object, will that change be saved and loaded as well?
@pamzrockshow156
@pamzrockshow156 5 ай бұрын
Hi Thankyou for create thi video, I want to ask a few things, how to create save game for character crerator, and bring to new or next level
@michaelcasseus2497
@michaelcasseus2497 7 ай бұрын
nice tut matt can you do one when u got like ten trees surrounding the floor in a level then duplicate that level with only the floor then transport the character between levels saving the transform of the character as if it's lev1 outside lev 1 inside ??
@user-ym4ec1lf9z
@user-ym4ec1lf9z Жыл бұрын
고맙읍니다. Thank you
@lukesfilmltd
@lukesfilmltd 2 жыл бұрын
this is fantastic and works perfectly but quick question... how would you reset these stats if you want to reset the level?
@aegislighthammer8246
@aegislighthammer8246 Жыл бұрын
My best guess is that your open level by name chain also has set (stat) to (original integer)
@Furios_Ethan
@Furios_Ethan 2 ай бұрын
hey could you make an video on how to make an delete save blueprint for this please
@mate1_dev
@mate1_dev 11 ай бұрын
This video is old but can you help me with "The variable is not in scope" on the save game object
@NexterExpert
@NexterExpert 2 жыл бұрын
Can you make a tutorial on how to make a quicksand?
@GrifChan
@GrifChan Жыл бұрын
what do i do when i want to set skeletal mesh, for save customization? TwT (Mesh is not conecting to skeletal mesh variavel)
@Theslayeer3
@Theslayeer3 2 жыл бұрын
so i have a main menu with continue and a pause menu with a save, ive followed like 3 of your tutorials but i don't know what im doing wrong. Help plz :)
@Chinesestud
@Chinesestud 3 ай бұрын
Hey, I was wondering does it work with packaged game?
@eve_hub
@eve_hub Жыл бұрын
great tutorial, but as I have saved a level or any changes then I want to delete that saved level How to do so?
@MartKart8
@MartKart8 2 жыл бұрын
Wait I found a issue if I use a transform , when I load into a new level, my character keeps the location data in the wrong map and falls continuously. I had to delete the Transform, but I kept the health and that works.
@sunmark8994
@sunmark8994 Жыл бұрын
Why casting the saveRef to my save blueprint aways fail?
@PrescottLawani
@PrescottLawani 2 жыл бұрын
Hey, this is helpful! I have a couple of issues though: 1. How do you save your stats into the next level? Like if I wanted all the "coins" or inventory I collected to be there when I get to the next zone. 2. It looks like if I save then load, items that were collected already were not reloaded. For example: I saved, collected some coins, didn't save, but instead loaded. The coins were still gone and my character was loaded back to where he was when I first saved.
@sbravoo
@sbravoo Жыл бұрын
Hey man did you manage to find out how ?
@PrescottLawani
@PrescottLawani Жыл бұрын
@@sbravoo Sort of. I was able to get the coins to be there after saving and not loading. But then I get a whole new slew of issues. Not to mention I got the solution from someone else so I wouldn't really know how to come up with it from scratch
@sbravoo
@sbravoo Жыл бұрын
@@PrescottLawani can you somehow send me the solution ? Do you have like a link for a good tutorial or a guide ?
@kokostas879
@kokostas879 Жыл бұрын
What about having more than 30 variables that need to be tracked and saved and loaded? Still I can add one by one or should I do it by another way?
@Chatmanstreasure
@Chatmanstreasure Жыл бұрын
Wondering the same thing...wonder if we can put it in a struct and just save the struct
@Silver-iix
@Silver-iix 2 жыл бұрын
Hey Matt, I have run into an issue where this save system does not work for packaged versions but works fine inside the editor. Any ideas on how to resolve this?
@Tundralia
@Tundralia Жыл бұрын
I'm getting the same issue with my save system too, would love to know how to resolve this.
@recsund
@recsund Жыл бұрын
yep same, here , wonder if it's cos each variable needs to be set as a savegame in advance or possible to do with game instance etc, but yeah such a fundermenal part of game dev .
@Silver-iix
@Silver-iix Жыл бұрын
@@recsund I’m aware this is quite old and I never actually resolved the issue. I used this system for two games. One for an infinite runner to save player stats, store purchases, ammunition and upgrades, best score, and store purchases. The next time I used it to create a checkpoint system for a separate game, which would save the location of the last checkpoint the player passed, and then spawn them there if they died or reloaded the game. First system worked fine for both the editor and the packaged version, where as the second only worked for the editor version. I think it’s some kind of compatibility issue. As the first project was created on an earlier version of UE.
@recsund
@recsund Жыл бұрын
@@Silver-iix intresting, good to know it is actually kinda possible with this, cheers!
@xXBrutus67Xx
@xXBrutus67Xx 2 жыл бұрын
8:18 Is there a way to delete the old references ? Because the value of the slot name (here it's "slot1") is still stored somewhere. I found out that even after closing Unreal without saving (i disabled automatic save), this "slot1" value is still stored with all the datas. I did this exercise again and when i spawned, i was at the same location as i was earlier when i saved the game manually, which shouldn't happen EDIT: the values are stored in project/Saved/SaveGames
@TorQueMoD
@TorQueMoD Жыл бұрын
The purpose of saving is that it is creating a save slot for your data so that you can recover it when you close down the game. If you only want the data to be saved temporarily then there's no need for a save system because all the data will reset to their default values the next time you launch the game. If you want it to only restore the data once (ie the next time you load the game) then I would suggest updating the data in the save file back to whatever you want your defaults to be, and then save again.
@CRogers2013
@CRogers2013 8 ай бұрын
Love the tutorials but its ridiculous Unreal hasn't created a more simple and auto way to save.
@hazemsy2797
@hazemsy2797 Жыл бұрын
i have 2 level, i save when i am on 2 level, i re open, i am in level 1?
@mspcbs1657
@mspcbs1657 Жыл бұрын
how to save the widget (like CanvasPane add child) child and load it
@aaronhille9927
@aaronhille9927 Жыл бұрын
This is a great tutorial! However, I'm having one issue with it, and I don't understand why this happens. It runs through all the code and outputs "Game Saved!" after I activated the save game command. But when I click load game, it runs through all the code, outputs "Game Loaded!", but nothing happens. There are no errors in the code and I have followed yours 1:1.
@aaronhille9927
@aaronhille9927 Жыл бұрын
nvm. i read the comments. i didnt realise the default name
@user-mb5xx7gi6l
@user-mb5xx7gi6l 10 ай бұрын
How can I save and load game for multiplayer ? If anyone know plz help me
@TorQueMoD
@TorQueMoD Жыл бұрын
If you're calling a Load Game From Slot node from the Save Game Function, Isn't this going to create a situation where if it finds a previous save file, it's going to load that instead of saving a new one? Because you're always checking to see if the save game exists before you save. So this will run once and create the save, but then every time you try to save the updated stats again, it's just going to detect that a save file exists and then load the previous save. You should only check if a save exists when you start your game, or when you load.
@MEMUNDOLOL
@MEMUNDOLOL 9 ай бұрын
i does not load the game in the sense gamers understand this word, it loads data from the file on disk into application running in RAM, so it would have access to that data, to be able modify it, and write it back to the disk effectively saving it in a file to prevent it from being lost when application is unloaded from RAM, after you close the application (close the game).
@maxim9852
@maxim9852 2 жыл бұрын
what about auto save, if you for example walk through a door, it just saves?
@charzxd6515
@charzxd6515 2 жыл бұрын
Use the event of an overlap event
@MattAspland
@MattAspland 2 жыл бұрын
You can call the "save game" function on an overlap event for walking through a door. Or at the end of a looping timer, so it saves every 15 minutes for example.
@maxim9852
@maxim9852 2 жыл бұрын
@@MattAspland Alright, thank you :D
@tonyxmontony6103
@tonyxmontony6103 8 ай бұрын
Did this in a gameinstance; not sure how to grab my health. :(
@Soyo456schannel
@Soyo456schannel 2 жыл бұрын
Is there an option to make that save automatically?
@MattAspland
@MattAspland 2 жыл бұрын
You can call the "save game" function at the end of a looping timer, so it saves every 15 minutes for example.
@Soyo456schannel
@Soyo456schannel 2 жыл бұрын
@@MattAspland ohhh thank you so much!
@Si-Toecutter
@Si-Toecutter 2 жыл бұрын
If a make a variable at the end of a level, that then unlocks the next level by a branch, could I save that variable so if you quit the game it remembers what levels you unlocked? ...
@MattAspland
@MattAspland 2 жыл бұрын
You could indeed do that. Save and load that variable, and when you load the game (and that variable), also run the appropriate checks to see which levels you've unlocked.
@OutFinity374
@OutFinity374 5 ай бұрын
Hello brother! Can you make a video on how to replicate these save games and load games? Thanks in Advance
@ManlyTube
@ManlyTube Жыл бұрын
I don't want it to put me where it saved though
@yauyuki595
@yauyuki595 10 ай бұрын
It doesn’t work😢
@CraftyMaelyss
@CraftyMaelyss Жыл бұрын
Hi, I'm following this tutorial and it's works brilliantly but it's not saving the player's rotation unfortunately :/ Everything else is fine except the rotation P:
@MattAspland
@MattAspland Жыл бұрын
Hey, for the location of the player - you can use a transform variable instead of vector. Vector is just location, transform is location, rotation, and scale. Hope this helps :)
@CraftyMaelyss
@CraftyMaelyss Жыл бұрын
@@MattAspland Sorry for the late reply, that sorted the issue for me :) Also I was wondering how you would load games from the main menu? I'm having a bit of trouble trying to get that to work unfortunately. The saving works nicely but loading it from another scene is pretty tricky for a novice like myself ^-^;
@FedosGames
@FedosGames Жыл бұрын
Unfortunately it doesn't work...
@corbin9079
@corbin9079 Жыл бұрын
Did you ever figure it out? I have the exact same code as the video but its not working. I think it may have something to do with the load function but i cant tell.
@Sophrony777
@Sophrony777 Жыл бұрын
@@epicmoment600 Thank you brother. For those having issues even with a name in that variable: try renaming it to something else. It was working for me at first, but then stopped working on an engine crash until I renamed that variable to something other than what it was before.
@yauyuki595
@yauyuki595 10 ай бұрын
I type something in the default value of slot name (in variables of the character).Then I can save my game🥹.
Unreal Engine 4 Tutorial - Saving Level States
26:39
Ryan Laley
Рет қаралды 25 М.
Unreal Engine 4 Tutorial - Saving & Loading Pt.1 Basics
26:46
Ryan Laley
Рет қаралды 69 М.
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 25 МЛН
OMG😳 #tiktok #shorts #potapova_blog
00:58
Potapova_blog
Рет қаралды 3,5 МЛН
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 20 МЛН
Save And Load If An Actor Is Destroyed - Unreal Engine 4 Tutorial
23:24
Make your door open away from the player | UE 5
13:37
InsertNameHereGameDev
Рет қаралды 5 М.
Levelling Up / EXP System - Unreal Engine Tutorial
15:41
Matt Aspland
Рет қаралды 17 М.
How to Make a Game in UE4 Blueprints: Main Menu and Save Game
19:49
Sprinting And Stamina - Unreal Engine 5 Tutorial
17:00
Matt Aspland
Рет қаралды 68 М.
How to ACTUALLY Load Levels in Unreal and Make Loading Screens
16:31
The Game Dev Cave
Рет қаралды 33 М.
Unreal Engine Save Game Tutorial
11:37
Seredias
Рет қаралды 12 М.
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 25 МЛН