Unreal Engine 4 Tutorial - Saving & Loading Pt.2 Level States

  Рет қаралды 25,640

Ryan Laley

Ryan Laley

Күн бұрын

Пікірлер: 52
@coltons4889
@coltons4889 5 жыл бұрын
Great tutorial! got it working, but ran into a issue when switching levels the maps in the structs lose their actor references. Changing the map object variable to "soft objects" solves this
@Darth_Developer
@Darth_Developer 4 жыл бұрын
Hi! Having the same issue, can you explain how you solve it please?
@manicmice
@manicmice 4 жыл бұрын
THANK YOU! Cured my headache. Cheers
@Mrkarton
@Mrkarton 4 жыл бұрын
thank you
@horizon5431
@horizon5431 Жыл бұрын
I love you
@nfrancisj2122
@nfrancisj2122 5 жыл бұрын
I would consider creating a "base class" for all objects that need to be saved. Then subclass to build your objects.
@iasonasg
@iasonasg Жыл бұрын
hey Ryan im trying to replicate the same thing in UE 5.2 but from 17:27 i playtest the game its fine then when i play for the second time it crashes the engine
@fl260
@fl260 Жыл бұрын
I did this tutorial in the past and it worked. I did it again for a different project with a different engine version (using 4.27 now, don't know which version I used before when it worked) and it's no longer working now. I assumed the error was on my end and re-did it again, but still doesn't work. Tried to track down where the error came from and the problem comes from the Boolean "IsOpened" not being set to true upon loading. The load itself is working well but the variable is simply not being set to true. Again, I did the tutorial two times, assuming I did a stupid mistake, but I can confirm it's not the case. The Boolean is simply not being set to True when I load the level. I am baffled, I must admit. Will try to get it to work and will update that comment if I get it to work properly.
@ShadowVghost
@ShadowVghost Жыл бұрын
Did you get it to work? Got the same problem, worked well with 4.24 but after migration couldn't use this method.
@ShadowVghost
@ShadowVghost Жыл бұрын
The door actor itself cannot be added to map.
@elfideorubio1308
@elfideorubio1308 3 жыл бұрын
Just a warning. Use the "game state BASE" otherwise you would not be able to move, if you already create the other one you can reparent inside the class, by going to class settings and searching for it at the top.
@n1lknarf
@n1lknarf 4 жыл бұрын
I've been trying to make this work for weeks now. It keeps firing the overlap event even tho the boolean is being saved correctly. I literally have 2 branches, one at the very start and one at the end before saving, the first one fails and the second one works as intended.
@agentarachnid2009
@agentarachnid2009 5 жыл бұрын
Could you go over how to save collectables? Like how to make them persist in the players inventory and be gone from the level?
@florixel
@florixel 4 жыл бұрын
do you have a solution ?
@christophermiller2896
@christophermiller2896 4 жыл бұрын
@@florixel hi, ill try something, but would something like giving each collectible a specific index so when checking the save if said collectible is in it it then does not spawn on the level?
@EmarStudios
@EmarStudios Ай бұрын
wouldnt the gamestate be made completely irrelevent through the use of levelstreaming?
@mizfyre8228
@mizfyre8228 3 жыл бұрын
Works great! However, how do we save the state of the door between level transitions. When I load a new level, everything seems to reset. I followed the tutorial, but applied your logic to setting up a weapon wall mounting system. Everything saves perfectly when interacting with the weapon walls, but when i transition to a new level, and then try to go back to my home base where the wall mounts are...nothing is saved? If you ever get around to answering this, thanks in advance!
@MillicentSkyrim
@MillicentSkyrim 2 жыл бұрын
I followed the video like you said and when I try to get the save data from the game instance, I try to also set the level 1 data variable but it won't let me connect the save game data variable to the level 1 data variable.
@AdamSweeney85
@AdamSweeney85 5 жыл бұрын
Hey Ryan, I see you are saving the level data to default slot name, user index 0. What should I do if I want to save the level data to a specific save slot?
@BucketPls
@BucketPls 2 жыл бұрын
Hey bud, I am loving your tutorials on things! They are really well explained and I am learning a lot! I do have a question about this part of the save/load tutorial. In the first video you said it was recommended heavily to think ahead to what you want to save, but how important is that for saving things in the level instead? I only started learning UE5 a week or so ago and level states and the such are a bit too overwhelming for me and I am starting to feel discouraged to continue. Can I just leave this part of the guide till I actually start making levels and the things that need to be saved in those levels or is that discouraged from doing while still focusing on character movement/mechanics as it's so important?
@griff9829
@griff9829 2 жыл бұрын
Hey man. I have been learning UE for about a year now and I barely got to the point in my game where I thought it was a good time to start learning about saving and loading a game. My advice to you is just start by making something you really enjoy. This way you're not gonna be overwhelmed or discouraged easily. As for the part where he recommends to heavily think ahead of what you wanna save, believe me man even after a year of learning, it's still practically impossible to think of everything that needs to be done. Let alone after only a week of learning UE. Cheers mate and best of luck with your learning journey :)
@megtwin
@megtwin 2 жыл бұрын
Perfect, thanks so much!
@cristobalthompson2932
@cristobalthompson2932 2 жыл бұрын
Hi, thanks for your video, i used the system for one destroyed item, but when i try to save diferent actors just saves the first one, so i have to make a new structure por each blueprint that i save. Can you save multiples values of diferents blueprints in just one structure file?
@maleekomegaanubus763
@maleekomegaanubus763 2 жыл бұрын
do i necessarily need to make save data for each level if they all will have the type of objects?
@RyanLaley
@RyanLaley 2 жыл бұрын
No there is a way you can do it so it makes level save states dynamically. On the to do list to make video on in detail
@diskonnected2774
@diskonnected2774 3 жыл бұрын
Hey Ryan I really am enjoying your content, but I wonder if you could maybe redo this in unreal 5??? I am currently trying to adapt this series you have to my game, part one went well but this one really did a number on my engine. I was hoping you could try to recreate it. I know UE5 is still new but I was wondering if it was the logic that was making it crash or the engine just being in the early development still? I also seem to run into bugs with it when trying to go from say a main menu to a playable map for example, it will crash as well. Any insight would be tremendous. Keep it up and much appreciation for the work you do!
@anishkhudang7569
@anishkhudang7569 4 жыл бұрын
hey Ryan, i got a problem.I think it's UE4 problem or other thing. If we Made Track More Than 30 doors then SaveGameObject get reset.
@alphaomegastudio3d420
@alphaomegastudio3d420 2 жыл бұрын
do u have any discor chanel or make any mentorship ?
@vegitoblue2187
@vegitoblue2187 4 жыл бұрын
Does this method work for even when I'm trying to save the level state when I transit across levels?
@RyanLaley
@RyanLaley 4 жыл бұрын
Yes you just save the various things that need saving and on the level opening you load those variables into the their respective actors
@vegitoblue2187
@vegitoblue2187 4 жыл бұрын
@@RyanLaley wow that was quick. I'll give it a shot
@vegitoblue2187
@vegitoblue2187 4 жыл бұрын
@@RyanLaley What if I want to do this for pickups like they dont respawn when I load the level again (think coins in dishonored)
@GrumpyMunkyGameDesign
@GrumpyMunkyGameDesign 3 жыл бұрын
Hi, Just a quick question but a hugely Important one for me, I really loved the build mode tutorial and have incorporated it heavily into my game, when I viewed this tutorial I was really hoping to find a way of saving the entire level and all the blocks the player has placed within that, Ive got the basic variable save system up and running but Ive got no idea how to go about saving all the changes the players made to the level and the location and state of all the blocks theyve placed within it, do you have a video covering that? Or do I have to find someway of recording the location, orientation, type, power state etc of every block the player has placed and recall that all everytime they load the level? Because that seems like a huge time sink and there MUST be a better more efficient way of saving changes within a level?
@demian165
@demian165 3 жыл бұрын
I'm pretty sure that's exactly how you do it man, you just gotta save the location or etc of the block and u should be good, it is time consuming, but well worth it!! Your game will come alive! I'm Pretty sure there are better and more efficient ways to save all that info, I sadly don't know them
@FrancescosToon
@FrancescosToon 5 жыл бұрын
Well, i can't figure out a way to make it work with my BP door, since it works differently
@nfrancisj2122
@nfrancisj2122 5 жыл бұрын
Francesco's Toon How is your door different?
@ericheinsen823
@ericheinsen823 4 жыл бұрын
How would I load the data when calling open level function, when lets say I jump through a portal to another level?
@ericheinsen823
@ericheinsen823 4 жыл бұрын
Nvm... coltons suggestion worked for me. thanks
@BearNWolfGames
@BearNWolfGames 4 жыл бұрын
Not working for packaged game but works in editor
@27kmaster
@27kmaster 5 жыл бұрын
Is there anyway to use this system with level streaming? cause with the persistent level open and the sub levels streamed it doesnt work :(
@candymangames5022
@candymangames5022 4 жыл бұрын
27kmaster you ever find out ?
@27kmaster
@27kmaster 4 жыл бұрын
@@candymangames5022 dont think i did, I ended up instead using a name array and the game instance instead that works pretty well so far
@BitterBatProductions
@BitterBatProductions 4 жыл бұрын
@@27kmaster you got it spot on, with streaming you have to manually save your level names when you "load streaming level" and save it as your current level so it saves the data for that level, then when it is loaded again you have that info saved :D
@benjaminroope9353
@benjaminroope9353 4 жыл бұрын
Whenever I exit the editor and then play again it loads perfectly, the problem is, whenever I die, I reload the level and reload all the data. There is an enemy who after you defeat him, he should disappear and stay disappeared, but when I die, he comes back, and the mapping that says it is beaten and should destroy it doesn't save.
@col_panic9802
@col_panic9802 2 жыл бұрын
im having this same problem, reloading the level doesn't load the level data
@benjaminroope9353
@benjaminroope9353 2 жыл бұрын
@@col_panic9802 so what I figured out after a lot of searching and testing, instead of saving the object that was supposed to be destroyed as an actor reference, I saved it as a string reference of the display name. This then loads based on the name of the object instead of the object reference and for some reason that fixed it for me. Hope this helps!
@earthbornjim9975
@earthbornjim9975 5 жыл бұрын
Quick question. If I have a level with say 5 doors and I want to save/load their state, and I also have a Player Character who has Hunger/Health etc, and I wanted to use F5 for example to save the current game, and F6 to Load the game, would this be done any different? Do I still let my Level Blueprint handle the saving/loading of the level stuff (doors) and a different function to save my character stuff? I think i'm confused :) Saving and loading has always given me a hard time. Thanks for your videos though, they help immensely.
@nfrancisj2122
@nfrancisj2122 5 жыл бұрын
EarthBornJim In these videos he is doing a generic all purpose save/load. (For tutorial purposes). In actual development, you'd plan out what needs to be saved, and when. Most games save only when you reach a checkpoint, or when the user chooses to save, and it saves only the data that has been changed rather than all data available. This reduces save and load times. I would use the game instance for everything, and only save what has been changed. I have some R&D I did here. Feel free to download the projects. github.com/NfrancisJ
@velikiy-prikalel
@velikiy-prikalel 4 жыл бұрын
hi, i just want to warn you that using F5/F6 in the editor is not good idea. I had tried this some time ago, and it seems to me that these buttons used as hotkeys for debug. For example, as i remember, I tried to switch first person view to 3d view by these keys, and the editor just show me green screen.
@johnwheel2591
@johnwheel2591 5 жыл бұрын
ive got a problem. so it works fine, but sometimes, so some reasons their state doesn't load correctry. i mean most of the times it loads as it should, but sometimes it saves their state but then wont load it, keeping it closed
@27kmaster
@27kmaster 5 жыл бұрын
did you find a solution?
@Shentoza
@Shentoza 4 жыл бұрын
I think this solution doesn't scale well at all... Unreal has a SaveGame flag for properties that should be used. Otherwise you have to do this, for EVERY.SINGLE.ACTOR. that you want to save things with. And every single variable that should be kept.
Unreal Engine 4 Tutorial - Saving & Loading Pt.1 Basics
26:46
Ryan Laley
Рет қаралды 70 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Why Solo Developers Should Use Unreal
9:51
Thomas Brush
Рет қаралды 460 М.
An Introduction to SPUD: UE4 Persistence, Save Games etc
16:51
Steve Streeting
Рет қаралды 2,3 М.
Unreal Engine 4 Tutorial - Saving Level States
26:39
Ryan Laley
Рет қаралды 28 М.
The Best Unreal Engine Sample Project you've never heard of
9:10
Save And Load If An Actor Is Destroyed - Unreal Engine 4 Tutorial
23:24
[UE4] Saving Progress in your game!
9:31
Aaron Hunt
Рет қаралды 13 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Save And Load Player Stats - Unreal Engine Tutorial
12:46
Matt Aspland
Рет қаралды 41 М.
Unreal Engine 4 - Save Your Level & Checkpoints
8:50
Beardgames
Рет қаралды 15 М.