Save And Load Current Level/Map/World - Unreal Engine 4 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024

ความคิดเห็น • 76

  • @bearishfnaf
    @bearishfnaf ปีที่แล้ว +5

    Watching this after two years because I forgot how to do it AGAIN💀
    Also your TUTORIALS helped me so much for my game developer journey

  • @RTSun-lx7ee
    @RTSun-lx7ee ปีที่แล้ว +1

    Matt, I really appreciate the effort you put into these tutorial. Although I'm doing mostly in C++. But as long as I understand your video and familiarize myself with unreal API document. I can do these functions without too much pain.
    I know sometimes people jeering helpful tutorial like yours like "not best practise/doing anything in character BP... " blahblahblah. But they simply did not catch the point. Thank you.

    • @MattAspland
      @MattAspland  ปีที่แล้ว

      Glad it was helpful! Thank you so much for your support!

  • @stevenwynn819
    @stevenwynn819 3 ปีที่แล้ว +2

    Another great topic that hasn't been covered well before. Thanks!

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Thank you Steve, always a pleasure :)

  • @makeitunreal6057
    @makeitunreal6057 2 ปีที่แล้ว +1

    Thank you so much! This is just what I needed to bring my game to life!

  • @sniper44x
    @sniper44x 2 หลายเดือนก่อน

    Hey when your variable is grayed out like that you can just right click and create this variable especially for anything thats just a basic variable type, even the advanced ones if you dont have more than one of that type of variable, even then when selecting the type it only lets you choose from variables that will plug in correctly, so like it works in most cases

  • @felipeolaiz4397
    @felipeolaiz4397 2 ปีที่แล้ว +1

    Thank You bro :D, It is a excelent tutorial

  • @jaye7930
    @jaye7930 3 ปีที่แล้ว

    Thanks a lot i have been looking for this a long time

  • @FPChris
    @FPChris 26 วันที่ผ่านมา

    7:50 This is ok if your only loading the level by name but if you have tons of other data it gets dumped when you Open Level. Which is likely the first thing you do. Then you have reload all of the save game AGAIN once the level opens.

    • @FPChris
      @FPChris 26 วันที่ผ่านมา

      Actually I think I resolved this by putting the Load Game and Save Game inside functions in the Game Instance. I set a flag on calling LoadGame to 'isLoading' then when a level opens I check for that flag. If it's set I continue parsing the SaveGame data that exists the GameInstance. If the flag isn't set I just let the level load normal. It seems to work from what I can tell.

  • @taroura9408
    @taroura9408 ปีที่แล้ว

    perfect. very helpful. thanks!

  • @miqseregg8538
    @miqseregg8538 6 หลายเดือนก่อน +1

    will it save every thing that has changed?

  • @1AnimeFinder
    @1AnimeFinder 3 ปีที่แล้ว +3

    Could you do a tutorial on saving World Composition

  • @magegames6202
    @magegames6202 3 หลายเดือนก่อน

    ive been looking everywhere for this trying to find level saving and loading all you get is save a level by hitting save all and load last level loaded in the project settings to open last level loading the engine

  • @wolfiedgr8t
    @wolfiedgr8t 3 ปีที่แล้ว

    That's really great, thanks Matt

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      Thanks no problem! :)

  • @Xiomz
    @Xiomz 3 ปีที่แล้ว +1

    Very good, I managed to save the map and load it, but not the location of the character with this same save, for example XYZ >.

    • @Spadez.
      @Spadez. 2 ปีที่แล้ว

      You have to add all that in manually. If you go into the SaveGame Blueprint you can do things like add a variable for characters world location, etc. As far as world state saves....that I am not sure about and why I am looking for a faster way so I don't have to add EVERYTHING...maybe a map save file of some sort

  • @ValueOfficalHelloNeighbor
    @ValueOfficalHelloNeighbor หลายเดือนก่อน

    matt, i do not find "get current level name" 5:22

  • @jtscott8807
    @jtscott8807 ปีที่แล้ว

    Player comes back but input doesnt work, can't move, jump, etc.

  • @itsxfields420x4
    @itsxfields420x4 3 ปีที่แล้ว +1

    My question is tho after saving all these different things and everything is working, and when I publish my game to the app store when I update the game will it keep the saves or will they be reset?

    • @RxPharmacytech
      @RxPharmacytech 2 ปีที่แล้ว

      Have you figured this out yet? I’m putting this save feature into my game and want to know how do we reset the save file back to zero so we can start at the beginning of the game?

  • @Shibandan
    @Shibandan ปีที่แล้ว

    This thing working. But if I load game saves with quests, health and etc, after level load all instance variables disappear, there no quests, default health and etc. Have any idea how save all variables after load map, different then default? On default map loaded all are safe.

  • @jakubkulis6517
    @jakubkulis6517 3 ปีที่แล้ว

    Hey , i got a problem if i start the game on android , works the first map but if i go to the actor that tele. Me to map2 it put me back to main screen . Can somebody help me ??

  • @LDT7Y
    @LDT7Y 2 ปีที่แล้ว

    I'm building an open world game, so have a persistent level map and then various levels streamed in/out as the player crosses different trigger boxes. How does saving location work with this? Do I need a unique boolean variable for each level map (there are 100+) and then have these variables set to yes/no whenever a trigger box is crossed and a level is loaded in (then just save these values to the save game slot as the player moves around the world)? Then do I save a separate variable for SpawnTransform (as in your other video) to get the exact location of the thirdpersonactor?

  • @michaelkukula5926
    @michaelkukula5926 11 หลายเดือนก่อน

    Say I wanted to make a Save Level and a Load Level screen. If I wanted there to be possibility of up to 20 save/load slots, do I need to recreate your steps 20 times, each with a different game slot number?

  • @bobgratton2986
    @bobgratton2986 ปีที่แล้ว

    how would you do to load the game from a menu, like you can look at the save file and when pressing it it will load. Whats the node for that to actually save the save file in a widget and show it on screen to load it on click. Because, whats the point of loading a game from a button, in every game you actually see the save file. Im wondering, when you save, how to access the save file after in a menu widget.

  • @Jimmybear06
    @Jimmybear06 3 ปีที่แล้ว +1

    Thanks.

  • @allins8759
    @allins8759 7 หลายเดือนก่อน

    Please can you make a tutorial about how to save the last character mesh material (lets say outfit texture) and load that mesh texture of your character mesh when you re open the game.
    Lets say the ue mannequin is grey and you change the mesh material in the game to red. You close the game and when come back and load the game the mannequin is red again. ?
    It would be very useful please!!!

  • @RxPharmacytech
    @RxPharmacytech 2 ปีที่แล้ว

    How do I delete/reset a save file/String variable so I can start from the beginning of the game again?

  • @chilla86
    @chilla86 3 ปีที่แล้ว +1

    Do you have any tutorial if I for example get 10 in money and when I go to the next level I take with me this 10 money. Because right now when I go to next level it will be 0 all time. Thanks for help!

    • @LDT7Y
      @LDT7Y 2 ปีที่แล้ว

      Save it as a variable 'money' to wherever you store your local variables during gameplay (in your game instance for example) or to a save game slot directly. Both game instance and save game slots store data across all levels during the game. Then when you load the next level, cast to that location, get the variable storing your 'money' value and you can use it in the new level and keep adding to it.

  • @Jimmybear06
    @Jimmybear06 3 ปีที่แล้ว +3

    Could you do a tutorial on how to add a camera (from a level/map) as the background of a main menu.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      I could look into doing that yeah :)

  • @KratonWolf
    @KratonWolf ปีที่แล้ว +1

    I noticed you're saving and loading via level Name, I'm wondering, is there a way to do this via Object Reference instead? I wasn't able to find a Get Current Level Object Reference node. Any idea how I would do that? Or is by Name the only way?

  • @radoslavdimitrov7505
    @radoslavdimitrov7505 6 หลายเดือนก่อน

    Does this work with persistent levels and stream levels?

  • @ShadzHorkos
    @ShadzHorkos 3 ปีที่แล้ว

    May I ask: was variable "Level name" removed?

  • @pezdspncr77
    @pezdspncr77 3 ปีที่แล้ว +1

    Everything works until I try to load from my main menu, it won't even execute the False function of opening the first level. I placed the original blueprint in my pause menu graph rather than a character graph since I don't have a character in my game. I can save and load properly from my pause menu, just not my main menu. Could placing all of the blueprints in a widget be the issue?

    • @pezdspncr77
      @pezdspncr77 3 ปีที่แล้ว +1

      After debugging the blueprint on the main menu, it is failing at the point where it would cast to my saved game. Again this functionality works on my pause menu widget, just not my main menu.

    • @pezdspncr77
      @pezdspncr77 3 ปีที่แล้ว +2

      Sorry for all of the comments, I figured it out. If anyone else has this issue, what I was doing wrong was promoting the Slot Name to a variable after pasting into the main menu blueprint. I went back and followed exactly how the video did it by adding the variable as the same name and having the system execute the prompt.

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +2

      Glad you got it solved and thank you for sharing your fix with others in case they are struggling too!

    • @izzyharvin
      @izzyharvin 2 ปีที่แล้ว

      That's exactly the issue I'm having: My load button is on my main menu you widget and my save game is on my pause menu widget (follow the same tutorial as Matt to make the main menu and pause menu). The only difference I did is when you start the game, you go to another widget to choose a level then you there. I press the save button in the pause menu then quit to the main menu. I press the load button in the main menu and it doesn't load the save game but rather take me back to the level select like I if I pressed start game. Thank you, for the help if you have guidance on this. @mattaspland @pezdspncr77

    • @izzyharvin
      @izzyharvin 2 ปีที่แล้ว

      Nevermind I figure it out lol. I forgot to add the Slot Name Default Value after I copy and paste it. Sweet Victory!!!!!!! @mattaspland @pezdspncr77

  • @AntonioFreyre
    @AntonioFreyre 3 ปีที่แล้ว +1

    does this just save what level to load, but no variables, destroyed actors, etc?

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      This just does the level, but in the save game you can set up other variables in there too. So you can get other variables and then set them into the save game we made and load them again all the exact same way we did with the level name.

    • @AntonioFreyre
      @AntonioFreyre 3 ปีที่แล้ว +1

      @@MattAspland awesome! thank you

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      No problem!

    • @sniper44x
      @sniper44x 2 หลายเดือนก่อน

      I had a save game with other variables already created i just added the levels variable lol - which i have actually set up as a checkpoint system... needless to say i spent 4 hours trying to integrate this, but it works - one thing i need help with if you could however, when i load my save and it loads the correct level, i have a variable for world transform and for rotation, it saves my last checkpoints location before jumping into the next level and spawns me there, instead of at player start or 0,0,0...

  • @kaymonosara
    @kaymonosara 2 ปีที่แล้ว

    How to save world or environment changes in Unreal engine?

  • @abdullahsohail5395
    @abdullahsohail5395 3 ปีที่แล้ว

    Nice another great video

  • @E36_shayne
    @E36_shayne 3 ปีที่แล้ว +1

    ok this worked perfect for me but lets say i followed your video on making the character select screen and have 3 different chars with different skins. its a single player game. how can i load the last character i used and continue playing the game where i left off as, or the last character i played as. also from following your character select video i made all 3 different characters they have different ablities and are unique. a little more info is i can save the game and it then load it and i will get the last character i used then i can quit the game which will send me to my games main menu, but if i fully quit the game it will not remember the last character i used making me have to load my character from my main menu basically starting a new game, then once i have picked my character and it loads the first level with the character i can then load the game and return to the last saved place. basically in a nut shell how can i always load the last character used. also i have no default class as i want the player to have the option to select there own character and when i default to a class it will always work with teh save spots basically exactly how ur video showed for this video if i have 1 class it works perfectly but if i have many calsses it wont re load it sorry for super long comment but ive been trying to get this working for hours and i feel im so close lol.

    • @LDT7Y
      @LDT7Y 2 ปีที่แล้ว

      Have a variable like 'active character' that is saved to the savegameslot when you log out. Then when you log back in, have it check that variable to see which character was last used and load that one. Then just base which skins/base stats/abilities to load off that 'active character' variable.

    • @E36_shayne
      @E36_shayne 2 ปีที่แล้ว +1

      @@LDT7Y I figured this out maybe a few days after writing this comment but thank you for the help good sir

  • @pangeaedit8868
    @pangeaedit8868 3 ปีที่แล้ว

    when i load my game in another level after saving it... i cant move anymore, got any help?

    • @Cordskidon
      @Cordskidon 3 ปีที่แล้ว

      add 'set input mode game only' in either the character blueprint after save or the new level blueprint. You probably have it set in your first level only, which is why it won't work when loading directly to level from main menu

    • @izzyharvin
      @izzyharvin 2 ปีที่แล้ว

      @@Cordskidon Im having that same issue where my player don't move when I load the game. I have the "set input mode game only" connected with my level 1 and 2. How it is lay out: OnClicked (Level1 Button) ---> Set Input Game Mode Only ---> Set show mouse cursor ---> Remove from Parent (Target Widget) ---> Open Level by name. Get Player Controller is connected to Set Input Game Mode Only and Set show mouse cursor. Thank you for the help.

  • @beamngsamurai8
    @beamngsamurai8 3 ปีที่แล้ว

    Verry nice!

  • @redfoxsis
    @redfoxsis 3 ปีที่แล้ว

    great vidéo ;)

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว

      Thank you so much! :)

  • @TV-mb4wf
    @TV-mb4wf 3 ปีที่แล้ว

    Отличное видео 👍

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      Нет проблем, рад помочь! :)

  • @beamngsamurai8
    @beamngsamurai8 3 ปีที่แล้ว

    just an idea could you make climbing like holding on a ledge droping drom that ledge and moveing sideways in the ledge?

    • @MattAspland
      @MattAspland  3 ปีที่แล้ว +1

      Hey, great idea thank you. I haven't forgotten about wall running either don't worry :)

    • @beamngsamurai8
      @beamngsamurai8 3 ปีที่แล้ว +1

      @@MattAspland Awesome!

  • @Bentley0312.
    @Bentley0312. 3 ปีที่แล้ว

    7:31 as save game won’t go in the target

  • @Ethantheking1000
    @Ethantheking1000 3 ปีที่แล้ว

    7:33