Unreal Engine 4 Tutorial : Saving multiple locations/Items

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

Totally Unreal

Totally Unreal

Күн бұрын

Пікірлер: 153
@JohnDaniels
@JohnDaniels 7 жыл бұрын
Got it to work in 4.18. On the Save part exclude the Cast to Save Game. on the Load Game section on "Load Game From Slot" add the cast to save game and then continue with the video as normal.
@AxelHjelmqvist
@AxelHjelmqvist 6 жыл бұрын
I was looking for this comment, thanks bud!
@brunohppl
@brunohppl 5 жыл бұрын
This modification also makes it work with 4.21.2
@rctrickstipsfun6504
@rctrickstipsfun6504 4 жыл бұрын
oh man, i tried everything, but i dont get it what you mean. I use 4.21, i read below it works then, but i cannot figure out why it doesnt! cannot get the "set SaveGameSubclass" in the load area
@wtfranticdreamer
@wtfranticdreamer 4 жыл бұрын
@@rctrickstipsfun6504 just ignore "set SaveGameSubclass". Add "cast to save game" first, and use it's output node to "set SaveGameSubclass"
@rctrickstipsfun6504
@rctrickstipsfun6504 4 жыл бұрын
@@wtfranticdreamer thanks man, i figured out just a short while ago. Forgot to mention that here. Thanks for the help💪🏻
@durtydeeds69
@durtydeeds69 8 жыл бұрын
You're probably the only unreal tutorial guy i can stand for more that 2 minutes, so congrats on that. Great job with the paint explanation too. Keep it up!
@leland8021
@leland8021 6 жыл бұрын
That explanation was perfect!! The one you said you wanted people to leave a comment about. Nice job on this, man. It's really helped on a game I'm trying to make which switched between different levels very frequently.
@uncletrashero
@uncletrashero 3 жыл бұрын
There was an issue i had when i did this loading the game from a MainMenu level. It turns out that the call to the function "Load Game from Save" validates the object references and breaks them if it cant find them, which means if you do not actually have the Level loaded up when you call that function, the list will be broken. For example I called that function from main menu, stored the array in a variable on Game Instance, then loaded the level, and then tried to read the array from the version in GameInstance, and the array was broken (number of entries was correct but each object reference was broken). So Instead I had to load the actual game world Level first, and THEN call the function from game instance to load the game, and then the object references worked.
@actuallyfred8595
@actuallyfred8595 5 жыл бұрын
This is the best tutorial I have seen in my entire life. I really appreciate you trying your best to explain things and you did do really well on that! I hope the blueprints are mostly the same 4 years later but either way thank you for this amazing video!
@xavierlanglands9486
@xavierlanglands9486 3 жыл бұрын
This video is amazing! It helped me understand new concepts, explained things in a way I could understand without seeming like it talked down to me, and moved along at a swift pace. I wish I could like a video more than once!
@sharkeyboy123
@sharkeyboy123 7 жыл бұрын
Yep great tutorial. Nice rhythm and tone to your voice (very important when you have to listen to somebody for a long time.) Made lots of sense. Keep it up. Hope you recovered from your injury / op as well !
@XtianBretz
@XtianBretz 7 жыл бұрын
I liked the paint diagram! Fantastic tutorial. Not everyone can explain things quite as well as you do in this tutorial. This was exactly what I needed.
@m3au263
@m3au263 3 жыл бұрын
Great Tutorial!!! After trying several other Save/load tutorials only this one worked for me (ue 4.26.1)
@blake7086
@blake7086 3 жыл бұрын
For anyone looking at this tutorial now, a more modular way of doing this is to create a blueprint interface, and instead of saving with "Get all actors of class", use a "Get all actors with interface" node and add the interface to any actor you want to save.
@uncletrashero
@uncletrashero 3 жыл бұрын
is that any more beneficial than using Tags? (get all actor with tag) it seems like they are all equally slow processes? or i guess it depends on if you have lots of tags but few interface nodes ?
@LoneHatchling
@LoneHatchling 5 жыл бұрын
A huge time saver, goes great with another KZbinr UE4 project, keep up the great work
@VoodaGod
@VoodaGod 9 жыл бұрын
perfect, this is exactly what i was looking for! thanks!
@tstproductions4583
@tstproductions4583 8 жыл бұрын
Thank you! ----- You made it so easy for me and you nailed the explaining! it was so easy to understand what you talked about! ;)
@uncletrashero
@uncletrashero 3 жыл бұрын
You can do an array of Structs, so you can do both location and class reference in a single struct, and then save an array of those structs
@3ch0Sh1ft
@3ch0Sh1ft 4 жыл бұрын
OH MY GOD! THIS is se BEST Turorial for Saving the own game. Thank u very much for this perfect Tutorial!!!!!!!!!!! :D
@jimbo5528
@jimbo5528 8 жыл бұрын
Finally a good to the point tutorial. Thanks a lot. Really helps out us beginners!
@JohnDaniels
@JohnDaniels 7 жыл бұрын
Great video! Something must have changed in 4.18. When I try and connect the "Load Game From Slot" return value to Set "SaveGameSubClass" I get an error about Save Game Reference is not compatible. I have tried your video and another video and get the same error at the same place.
@kmcasi2037
@kmcasi2037 7 жыл бұрын
Cool, I was working on some modular build project and was frustrating to place some actor and wen u come back on the game to not be any one there, now I get the point, and I understand how to make it. I mean I like because is not copy-paste like 'make this, connect that to there etc.' I can understand why I connect that to there :)
@filipofilipao
@filipofilipao 6 жыл бұрын
Man, I need help!!!!. How do you make it work on a build system? I'm trying but it only works for objects that were already in the landscape. When I try to load objects that I put after start playing, it does nothing, just load the player position and all that stuff.
@TheHatMan69
@TheHatMan69 4 жыл бұрын
THANK YOU SIR!!! I got a bonus out of this! I had yet to figure out how to change the controller rotation, and now I can! Lmao thanks again! (P.S.: This works in the latest version, 4.24.3, as far as I can tell! Yippee!)
@JohnDaniels
@JohnDaniels 7 жыл бұрын
Was anyone able to add additional actors to save? When you change actor class to anything else you get an error?
@nerumanil7296
@nerumanil7296 3 жыл бұрын
Thank you very much this was one of the greatest problems I had in my unreal project!
@thetwostoryhouse1550
@thetwostoryhouse1550 9 жыл бұрын
Thank you very much for this tutorial, it helped a lot. (hope you have fully recovered from your operation by now :) )
@raivo4716
@raivo4716 10 ай бұрын
So good. Thanks. Really hoped to find solution for this problem. Perfect.
@razametaza
@razametaza 8 жыл бұрын
At 6:00 , couldn't you create an array of Structures containing the classes and transforms?
@JaPls
@JaPls 8 жыл бұрын
This makes every save game blueprint make way more sense. Thank you haha
@TotallyUnreal
@TotallyUnreal 6 жыл бұрын
Just watching back some old videos, i reckon we could make this more efficient by having the object store its transform and just saving the object.... Just a thought ^.^
@noesechet1026
@noesechet1026 5 жыл бұрын
I was 6 min into the video and I thought I would ask the question x) Thank you for predicting that ;)
@uncletrashero
@uncletrashero 3 жыл бұрын
the object already stores its transform ?
@GHSTLurker
@GHSTLurker 2 жыл бұрын
Doesn't work for UE 5. Unable to do the steps at 18:11.
@nonpurplestar4158
@nonpurplestar4158 5 жыл бұрын
Thanks for the tutorial! But what about the objects that were spawned? Any thoughts about that?
@uncletrashero
@uncletrashero 3 жыл бұрын
i believe you would basically make an array of the class types as a reference, then on Load, for each item in the array you SpawnActor (spawn / instantiate) using that class reference, and then apply the rest of the variables to it. it can be useful to use structs instead of multiple separate arrays ( so instead have a single array of a struct that has the location/class reference/other variables/etc, and build to/from that struct array)
@JakeSmout
@JakeSmout 5 жыл бұрын
Any chance you'd make an updated version of this? I could really use your help. Thanks.
@Jimmylurks
@Jimmylurks 7 жыл бұрын
Good video~ I would say for anyone looking into this recently to try creating a Structure that contains a variable for class and for transform. Then maybe the process would run a little smoother maybe if it came to even larger maps. Ever since I understood structures, I think I fell in love with them lol. I am curious how well it would work across multiple maps since I would be uneasy to save their transform just by leaving a map. So maybe a temporary array / save file when leaving a map could be used to feed the final save file the updated info without having the chance to incorrectly save progress? It all depends on the design of the game, of course. I am trying for a farming/adventure game, currently. So that's why I wouldn't want to save it simply upon changing maps vs when the player decides to save the game. I think the loading part could check whether the temporary array has a length of one or more to decide whether to load from master save or temp save. Hopefully, what I said helps the thinking/building process for others. It helps me to type things to figure out some stuff.
@anthonygrosso1385
@anthonygrosso1385 4 жыл бұрын
Is there some way to accomplish this using associative arrays with blueprints in order to store more complex data?
@BlogTornado
@BlogTornado 6 жыл бұрын
How can you actually save High Score that's connected to Game instance with Game Save object. I got the game instance working but dont know how to save . I have saving set up as well but integer + integer increment doesn't work with game save. If I incremented by 1 it always shows 1 on each trigger over lap.
@arthurramazanov666
@arthurramazanov666 7 жыл бұрын
This is great - but do you have a check for whether the actor still exists or is destroyed? Would you do a boolean array? or have an is valid check somewhere in here?
@JohnDaniels
@JohnDaniels 7 жыл бұрын
Nice video, will this save spawned items also, like in a sandbox game environment, or does all the objects have to be in the level to start with?
@escorpianoyqueee
@escorpianoyqueee 7 жыл бұрын
Question, you are storing an array of transforms, and also an array of the instance that contains the same transform. Whould it be the same to not store the first array? and then when you want to load your level, you just perform a foreach stored instance, getActorTransform?
@slayerboy1717
@slayerboy1717 9 жыл бұрын
I was also wondering if you could possibly help in setting this system up through a UMG save and load button? That would help tremendously. Great tutorial though! Thanks a lot!
@EroPetter
@EroPetter 3 жыл бұрын
Awsome tutorial! Its an old video, but I realy hope someone can tell me why this is not working if the objects is teleported (not pushed arround) to a new location.. I set up a teleport by giving the actor a new location on overlap, but the new location isent saved.
@Lorecastapendragon
@Lorecastapendragon 4 жыл бұрын
thank you, this works great for my rts game, but for some reason when I try to set the building hp from the array, my buildings end up damaged, I set it up so it grabs the class instead of the object and set a variable on the buildings for their hp, so when you call to spawn a building you can also set its hp directly, unfortunately its getting weird values >.
@TheArcticTurt1e
@TheArcticTurt1e 7 жыл бұрын
I have an inventory system that i made in my game and i cant figure out how to save it for the life of me. Its slot based and I have no idea how to save the items that have been stored in the inventory. I can save the fact that theyve been removed from my inventory but not the fact that theyre in the storage. theyre basically just deleted
@NashMuhandes
@NashMuhandes 9 жыл бұрын
Hi, good tutorial, and the MS Paint drawing made sense. :P Can you upload an image of the completed blueprint for quick offline reference? Thanks!
@MuFeR.
@MuFeR. 9 жыл бұрын
Hey do you have any idea about how to do something similar to find out whether or not an actor is destroyed so that it wont be spawned at all after loading? I can set a boolean on event destroyed but since the actor is then destroyed when doing the "get all actors of class - for each loop" it wont add anything to the arrays because the engine wont find any actors of that class.
@Khimari
@Khimari 9 жыл бұрын
I'm trying to replicate this for allmost 3 days but it does not work in 4.9.2. There is some strange issue with ForEachLoop macro and it spoils whole setup. I can save pawn's transform but not the array's, keeps telling that 1) The Array is not compatible with Reference, 2) Later it begun to tell the ForEachLoop Array Target is undetermined... Is there a workaround? EDIT: OK I made this working but it only works with StaticMeshActor, it refuses to work for any kind of BP object I create like in the beginning of the tutorial.
@alficaso
@alficaso 9 жыл бұрын
hey, i think i know which your problem was. At the moment when you have to state, the two array variables for class, in the details panel, in the right side of the variable type scroll menu, there is a little symbol, that is made of 9 little squares, you have to click it to convert it to an array of that kind of variable. Then all will work. I just have one issue whit that, it happens that, even when you reset the Location,Rotation, and Scale. The load process don't stop the Momentum of any previous Physical force applied to the object
@Khimari
@Khimari 9 жыл бұрын
Thanks for the tip, anyway I think I will still need to use some higher inheritance level just to get everything possible into the array that can move in the level. Regarding your setup for class "class 1" you get only 1 class of objects out of all possible moving objects in the level, this script takes in matter only "class 1" objects. Thus there are two options, first build the script for all possible classes (no way) or use higher inheritance level which I believe is a way to go. I'm trying to move my understanding a bit further and as 80% of things were clouded 2 months ago, now it's much much better, thank you a lot for your script it really helped me to learn more about the engine. I composed your script directly into overlap saving script for my game thus when checkpoint happens, everything gets saved.
@noxabellus
@noxabellus 8 жыл бұрын
Why do you have to build and break the transform instead of using getTransform and setTransform? I'm asking because I was like "oh thats dumb Ill just use this" and it didn't work so now I'm curious why these even exist
@GrumpyMunkyGameDesign
@GrumpyMunkyGameDesign 3 жыл бұрын
Hmmm, it doesnt seem to work for my game, Ive got the ability for the player to put down blocks and machines MineCraft Style and I thought I might be able to use this to save the block locations but it always returns 'accessed none' while trying to set the blocks location, rotaion and scale from the array. Im not sure if this is because the blocks are being spawned in rather than present at level load, if its because they can be destroyed, picked up and replaced down and thats messing with the ordering of the array, it all seems to work up to the point of respawning stuff in, I tried with a few blocks I had placed manually and it saved the change at first then when I destroyed some more in game and saved I'd load back in and they would still be there, so it remembered the first change but not the second, absolutely baffling me at the moment Any help would be appreciated, although its an older video at this stage so idk if you will see this lol
@mgondim2007
@mgondim2007 8 жыл бұрын
I already check a lot of times.. .but here is justing saving the player position.. How Can I save intenger´s ?
@davibogo2492
@davibogo2492 6 жыл бұрын
Great tutorial, explained everything perfectly!
@celticdragonstudio5560
@celticdragonstudio5560 7 жыл бұрын
Hey iv been wondering is it possible to load the characters saved position after opening a level iv been trying this and it knows the last saved location but doesnt move the character to that location
@davidduhn9556
@davidduhn9556 7 жыл бұрын
All other tutorials on this topic are terrible. This one's perfect :^)
@rctrickstipsfun6504
@rctrickstipsfun6504 4 жыл бұрын
hey man i love your stuff! Somehow though it doesnt work for 4.21. I cannot set the SaveGameSubclass as a return value of the "load game from slot". In your video its 18:25. Whatever i try i dont get it running. It will save,.. i think :) But wont load! Have you any idea whats going wrong here?
@TritumOfficial
@TritumOfficial 4 жыл бұрын
I have the same issue :( did you ever figure it out?
@rctrickstipsfun6504
@rctrickstipsfun6504 4 жыл бұрын
@@TritumOfficial ha yes i have, but its a while ago. I think the cast to character must be in front of that subclasnode, and then it works
@TritumOfficial
@TritumOfficial 4 жыл бұрын
RC TricksTipsFun thanks I'll give it a go next time I get the chance :)
@xa447
@xa447 Жыл бұрын
13:09 like the part were that doesn't work, like it literally doesn't let me
@steel.croissant
@steel.croissant 4 жыл бұрын
Question: Couldn´t you just use "Get Actor Transform" instead of making a transform with the 3 elements?
@johnk6598
@johnk6598 4 жыл бұрын
And setactortransform on the load. Would really simplify
@JaredKellen
@JaredKellen 2 ай бұрын
is there a reason you use "make transform" instead of getting the players transform?
@TotallyUnreal
@TotallyUnreal 2 ай бұрын
@@JaredKellen no, getting the players transform will work too!
@trevorburk4376
@trevorburk4376 8 жыл бұрын
I've been trying to figure out something so i used your guide to save trees in my game (survival game) but when i destroy the trees and load the game it comes up with an error and i have no clue why.... i did make it in a user widget "W_PauseMenu" however i know it works because my health saves
@KeithMakesGames
@KeithMakesGames 9 жыл бұрын
much much use this provides, thanks man youre awesome
@Jamiex305
@Jamiex305 9 жыл бұрын
Hey wondering if you could offer some advice on setting this up using buttons from the UMG say a save button and a load button
@Behronzo11
@Behronzo11 9 жыл бұрын
+Jamie Mulvaney I'm also looking for help with this. I followed these steps, but I'm trying to only allow the character to save while sleeping and load button is in a main menu widget so when I try to reference the save game sub class I'm unable to set a proper target.
@Jamiex305
@Jamiex305 9 жыл бұрын
+Behron Georgantas so is it what u are looking for
@Behronzo11
@Behronzo11 9 жыл бұрын
+Jamie Mulvaney I'm trying to make a button that on clicked saves everything in the game. then I want to click another button in a different widget to load it all again.
@Behronzo11
@Behronzo11 9 жыл бұрын
+Jamie Mulvaney I'm trying to make a button that on clicked saves everything in the game. then I want to click another button in a different widget to load it all again.
@Jamiex305
@Jamiex305 9 жыл бұрын
+Behron Georgantas So I have an example showing you how to save and load from a menu's using buttons etc should be everything you need ! here is the link to download its a full project so you can see everything 1drv.ms/1W49d5o, one thing can you visit my youtube channel and thumbs up some of my development videos I have made documenting the development of my game would really help me out when the review comes
@xdragon5502
@xdragon5502 8 жыл бұрын
how to save player position between levels?
@Someone-mm5es
@Someone-mm5es 6 жыл бұрын
Is there a way to have multiple save files and be able to access and load them by having a load menu?
@KodakYarr
@KodakYarr 5 жыл бұрын
Yes, easily. Just make more save games with new names. Either name them automatically or have the player enter a save game name in the UI.
@capitainethug5550
@capitainethug5550 3 жыл бұрын
It didn't work: my class1 stay in the same position when I load the save, ue vetion: 4.26
@jamesharder3753
@jamesharder3753 6 жыл бұрын
great vid, but i guess it doesn't work for my needs at all. :( i was trying to have this save the locations of items that i spawned / removed from the map. My current setup, the class im saving and loading is the base actor bp of all my interactable items, right now, all i can do with them in terms of the level bounds, is pick them up to my inventory, and drop them back on the ground, and equip them to my character. I have it saving nicely for storing my stats and what my inventory was, and what i had equiped and such. But following this guide, after saving, the items on the map i pickup are not saved as no longer on the map, and the items i drop, are not being added to the map when I load. did i miss something or am i seeking something totally different in blueprinting setup?
@wolfboos
@wolfboos 6 жыл бұрын
Hey, i don't know if you still need help with this, but i'm gonna give you my opinion anyways. So, the items that you picked up have a blueprint i would assume? Also, it's kinda vague what you are saying about ""after saving, the items on the map i pickup are not saved as no longer on the map" Do you mean that they are not saved in your inventory? (after pick up) Or that they are not saved in the level? (which is correct, since you already picked them up and they are in your inventory, unless your game idea functions otherwise) Also ""and the items i drop, are not being added to the map when I load. "" Now, assuming that these objects have a blueprint, that means when they are called from the "get all actors of class" the object that you dropped should also be called, does that not happen? If so, then try to make it so that when the "save game" is triggered, the saving process for this class type will be done inside of that class's blueprint. (Which means there has to be a way for that class to know that the "save game" is triggered, in order to perform the save.... same goes for loading) I hope this helped.
@xdragon5502
@xdragon5502 7 жыл бұрын
can you update the turorial to 4.18?
@justsomegamergril9759
@justsomegamergril9759 7 жыл бұрын
I wish I could give more than one like. I did eliminate the "cast to TheSaveGame" 4 nodes after the G key node since it wasn't necessary.
@escorpianoyqueee
@escorpianoyqueee 7 жыл бұрын
new versions of unreal automatically casts the save game after you run "Create Save Game Object"... so for this example it was necesary, it seems also at that time it doesn't have a "Set Actor Transform" and he did a lot of work to set the transform
@friendlysealstudio4447
@friendlysealstudio4447 4 жыл бұрын
but how to make em deleted?
@incstar562
@incstar562 8 жыл бұрын
Hi Totally Unreal, nice Tutorial. It worked for me but Im new at UE4 and i tried to save the game by passing a special trigger-box instead of pressing “G”. Could you give me a hint? If i do a Event ActorBeginOverlap it saved on every trigger-box in the whole game.
@qwerty0165
@qwerty0165 9 жыл бұрын
Hello Totally Unreal, at first I wanted to say that this was a very great tutorial. I have learned much and I will be able to adapt this system to my own project. But for some reason it won't load or probably even save the rotation of the player. Could this be, because in my game the player is only able to walk left and right 90° or do you know any other reason? The second question is that in my endless runner game the player moves always further until he struggles at a certain point, hits something and dies. Therefore I'm spawning him a random generated array of tiles which get destroyed every 2 seconds when the player walked over it. I wanted to save the current tiles which are spawned, but when loading the tiles I get the error "Cannot access blueprint...It is pending kill..." I know that I cannot reach them anymore, because they got destroyed. is there a workaround ? I need to destroy the tiles so they dont probably block the path with the newly generated tiles. Do you know a way how to fix this? Thanks in advance.
@vihangatheturtle5205
@vihangatheturtle5205 5 жыл бұрын
IT TELEPORTS ME TO THE SAVE LOCATION BUT THEN BACK TO WHERE I WAS BEFORE PRESING K
@sarahalex4057
@sarahalex4057 6 жыл бұрын
Thank you so much! I'm using this to make an in game level editor
@bobost2
@bobost2 8 жыл бұрын
i want to save table, but not work. I followed all steps
@Matthew.1994
@Matthew.1994 9 жыл бұрын
how can i save keys that unlocks doors? so when i pick up the key it gets saved in the array but how can i let the door be unlocked then? like key1 for door1 and key2 for door2 with only 1 key blueprint and 1 door blueprint
@TotallyUnreal
@TotallyUnreal 9 жыл бұрын
tags
@Matthew.1994
@Matthew.1994 9 жыл бұрын
tags? how can i do that with tags?
@TotallyUnreal
@TotallyUnreal 9 жыл бұрын
+KleytenHD I'm not 100% certain however I know that you can do it with tags. have a Google about how tags work in ue4 :)
@Matthew.1994
@Matthew.1994 9 жыл бұрын
i know how they work but how can i get the tags from like 25keys and check wich one is for wich door?
@TotallyUnreal
@TotallyUnreal 9 жыл бұрын
+KleytenHD I couldn't tell you without having a play with it myself and its not something I have time to dig into right now, sorry about that but I really think tags are your answer
@Kein_Alias
@Kein_Alias 6 жыл бұрын
Good work! =)
@Aleks-uy7bo
@Aleks-uy7bo 7 жыл бұрын
yo dude this does not work anymore for 4.17.1 ..... like I don't get any errors,but it only sets my character in the place it is supposed to be. the actors don't get moved at all... please help :/
@TotallyUnreal
@TotallyUnreal 7 жыл бұрын
Bamboozled Aleks if it works for the character then it will for the other things. Follow the tutorial again closely and pause if you need to.
@Aleks-uy7bo
@Aleks-uy7bo 7 жыл бұрын
Yes I have actually reworked and customized the code to fit with 4.17 actually you can do a more encompassing save of objects with a little bit of tinkering with the loop... in general its all good I got the stuff fixed :)
@matthewwilding6139
@matthewwilding6139 7 жыл бұрын
I am having the exact same issue can you explain what you did bamboozled aleks?
@Aleks-uy7bo
@Aleks-uy7bo 7 жыл бұрын
Well instead of using specific actor reference (for the thing you want to save) I did it with just a general actor array,and then I tagged ones that I wanted to save. So I got (all actors with class) and -> (actor array) so when I load it does not seem to have problems after that...
@JohnDaniels
@JohnDaniels 7 жыл бұрын
Hey, could you post a picture or video of how you did that, it would be very helpful.
@mrskull6607
@mrskull6607 4 жыл бұрын
Perfect Tutorial!!!!
@primm4991
@primm4991 6 жыл бұрын
Great tutorial. Easy to understand :D
@wolfboos
@wolfboos 6 жыл бұрын
I understand this is like 3~4 years ago, and i personally made a 3 category based saving&loading system similar to this. But i noticed that you seem to need to make an individual array class for both transformation and saving the ID of the specific class... which isn't really that practical when looking at a project with hundreds of blueprint objects. I understand that you made this specifically according to a request, i'm just saying this cuz someone may look at this video and has to make an array class type to store many blueprint classes. So anyone reading this, you can simply use an object array instead of a specific class array. Since you're looking to save "General Object Variables" like the transformation and "ishidden" and such, you don't need to have a specific class type. You can instead have ONE object array, that you'll put all the objects classes in it, and ONE transformation (and if you want, a ONE boolean array for the "ishidden" variable). Though, you have to be careful as to get and set all the variables accordingly IN ORDER just like how you stored them in the object array. This is so much more practical than having an individual class and transformation array for each blueprint.
@earthbornjim9975
@earthbornjim9975 6 жыл бұрын
Hi. I don't suppose you have an example of how this would look in a blueprint do you? Also, maybe you could help with an issue i'm having with this system. I'll try to explain as clearly as I can. 1) I have a small level. My player has an inventory. There are a number of pickups (actor blueprints) in the level. 2) Now I can save and load both my Inventory and Player Location with no issue. Now my issue is with saving and loading the various pickups around my level. Let's just say for now, they are all of the same class 'BP_Pickup' Now if I press Play, and without picking up anything, I save the game, and then pickup an item (which gets added to my inventory) and then try to load the game I just saved, I have an issue. What I was hoping would happen, is my character would return to the location he was at when I saved the game (which it does) and that the pickup I picked up would reappear where it was before I picked it up (which it doesn't) < This is the Issue. It is not in my Inventory (which is right because I saved when my inventory was empty) and not where it was originally (which is my issue). If I stop the game, I then get an error saying the Load Save Game function couldn't access the Pickup because it is pending kill. Lastly, if I delete my save and play again but this time pickup an item which gets added to my inventory and then save the game and after that press the load save game button, my character goes to the right location, my inventory still has my pickup in it and the item I picked up is gone. However, If I then stop the game and play again (which automatically loads my save) My Player Location and Inventory are how they should be with the item i picked up earlier still in my inventory, however it has also reappeared on the ground again ready for pickup. How would I go about ensuring it doesn't respawn? Sorry for the long read, any help would be appreciated.
@wolfboos
@wolfboos 6 жыл бұрын
@@earthbornjim9975 Actually, i was planning on making a tutorial explaining the system that i have :b Though before doing so i'v been searching around for "saving&loading" tutorial videos, and i'm surprised to see most of them scratch just the very basics of it. I suppose there is an easier way for us to communicate with each other if you may need immediate help though.
@earthbornjim9975
@earthbornjim9975 6 жыл бұрын
@@wolfboos I wrote a bit more about my issue also, not sure if you can help. Any other way of communicating would be better than this :) Just let me know. This is the only real issue i'm having at the moment.
@wolfboos
@wolfboos 6 жыл бұрын
@@earthbornjim9975 Hey, i'm really sorry for the awful long time you had to wait before my reply... I'v had a really rough day. Last day of exams, and was awake since yesterday. Anyhow, i wonder if you can private message me here (if that's even possible in youtube) and send me your discord name to add you.
@earthbornjim9975
@earthbornjim9975 6 жыл бұрын
@@wolfboos Hey man no worries, I had to go to bed anyway. Was late in Aus here. I don't know how to PM here. But my discord name should be 'ILikeOnions'. I rarely use discord so I hope its right.
@budgetlabs4979
@budgetlabs4979 Жыл бұрын
Thank you so much !!!!! I was getting pissed .....until I found your video thanks again
@budgetlabs4979
@budgetlabs4979 Жыл бұрын
I used the get all actors with tag node and it works perfectly
@alficaso
@alficaso 9 жыл бұрын
Thanks a lot. Been searching for a tutorial for this, for a while. I second to that jamie mulvaney guy down in the coments. It would be great if you have some advice for implementing this trought an UMG.
@Romain_Derelicts
@Romain_Derelicts 5 жыл бұрын
Awesome tutorial ! Thank you :)
@alzeze2077
@alzeze2077 7 жыл бұрын
Dude thanks so much this finally worked xD cheers
@flooblybub
@flooblybub 4 жыл бұрын
I was having an issue where my arrays were adding more each time I saved instead of just getting what was in the world. fixed it by clearing each array (drag off of get array and type "clear") before getting the actors of class. That... seems to have fixed it..? I'm using a game instance to save rather than the player controller BP. Just posting this in case anyone runs into the same issue with a slightly different setup like mine. xx Thanks for the tutorial its gotten me much further through my bastard save system.
@georgeperry6004
@georgeperry6004 6 жыл бұрын
Didn't know how to use arrays before but......now i do. I got a building system going so this is perfect. Edit: This does not work for me at all. Messed around endlessly. I worked out that this system moves placed objects around. If i hit play and spawn objects in with a building option i have, you will have to set up code to spawn the objects at your transform location on load.
@creativepeople6769
@creativepeople6769 Ай бұрын
Не работает больше
@lewisjamieson6264
@lewisjamieson6264 8 жыл бұрын
Hey, You should upload photos of your work, for easy referencing and viewing. Just watched the guide and it's useful for building my knowledge. Tank You. *The only issue I am having is "Get Control Rotation". (Error This blueprint (self) is not a Controller, therefore ' Target ' must have a connection.)
@osiris19850530
@osiris19850530 7 жыл бұрын
Is this guy still around? Wanna ask a question
@TotallyUnreal
@TotallyUnreal 7 жыл бұрын
allan Roodt ask away
@capitainethug5550
@capitainethug5550 3 жыл бұрын
thanks, good video!
@joshmikeking
@joshmikeking 8 жыл бұрын
Great tutorial. It helped me get my save system in place really well. I ended up modifying it quite a lot, and I'm thinking about making an extension tutorial so its a bit more dynamic. Currently with this system it is only capable of holding a single level worth of physics objects. The moment you move to another level (even with the info saved and reloaded from a game instance) the arrays might not match up. Because for example, say you have 3 cubes in each room, you'll have one set of cube arrays in the first room indexed at 0,1,2. Then the next room they will index at 3,4,5, and a third room at 6,7,8 etc. Go back one room, and it will attempt to match up the current rooms cubes (the get all objects array will only find 3 cubes) which index now at 0,1,2, but are supposed to be matched up with the saved index of 3,4,5. ALSO... every time you save, its adding another element to the array for every cube in the room. This will inevitably lead to a bloated unwieldy array that is then useless and using up memory unnecessarily. So in my system, I've solved that problem. Let me know if you'd like to see it, and also I'd like your blessing to heavily reference this video.
@joure.v
@joure.v 7 жыл бұрын
This is the exact problem I'm currently facing and not being that proficient with how arrays work, I am struggling to wrap my head around it. I know your comment is a bit old, but I'm actually trying to figure out myself how to carry these values over from one level to another. So if you could explain that I would be incredibly thankful!!!
@UpsideDownOwl
@UpsideDownOwl 9 жыл бұрын
Thank you . helps a lot
@tryphonmanu
@tryphonmanu 3 жыл бұрын
thx, really helpfull.
@x1xNoisEx1x
@x1xNoisEx1x 8 жыл бұрын
1. Suppose I save a game and one of the saved classes is say an enemy. I shoot the enemy, I kill it and for performance purposes delete the Actor. What should I do on load? Validate ad each loop body does the object exist, if it does - set it, if it doesn't - pass to the next one? 2. Suppose The game has spawning enemies or objects, which appear during gameplay, and don't exist on start. I save the game, then get out of the game and want to continue. I suppose the answer is spawn actor of class and then set its properties for each array object, but what if there are some objects placed as default and some spawned on the way :D ? 3. The BIG BADA BOOM - combine 1 and 2 :D So we have to check if the object was default or spawned, if default - set its variables - if spawned - create it - if destroyed - do nothing? :D Just some more complex but real ideas to consider :) Anyway great tutorial, thanks!
@adamc3607
@adamc3607 7 жыл бұрын
Thank you!!
@brianokonner3859
@brianokonner3859 9 жыл бұрын
thanks
@Aivirx
@Aivirx 2 жыл бұрын
lmao anyone noticed "save the fu*king game" comment at the start?
@da_cat
@da_cat 3 жыл бұрын
6:29 So glad im not the only guy with hot chicks on his desktop XD
@KarenKawas
@KarenKawas 4 жыл бұрын
I was following this tutorial as seriously as I could and then Taylor Swift randomly appeared in the screen.
@SeanMaxhell
@SeanMaxhell 4 жыл бұрын
So sad for this tutorial. It have my actual problem. GetAllObjectOfClass doesn't get everytime the objects in the same order. This script work only if the objects are totally the same. useless.
@AggelFireHD
@AggelFireHD 8 жыл бұрын
1:50 vur bana dedi :D AQW:EDQAWED
@allGameCenter
@allGameCenter 8 жыл бұрын
I died at " save the fucking game " :D ROFL GJ m8
@JoshGamerHD
@JoshGamerHD 7 жыл бұрын
lol save the fucking game haha
@TheIsleNarrator
@TheIsleNarrator 5 жыл бұрын
Awful drawing skills... but awfully helpful too :P
@ВенераПириева
@ВенераПириева 5 жыл бұрын
Thank you !!!
[UE4] Saving Progress in your game!
9:31
Aaron Hunt
Рет қаралды 13 М.
Unreal Engine 4 Tutorial - Saving & Loading Pt.1 Basics
26:46
Ryan Laley
Рет қаралды 70 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Data Layers | Unreal Engine 5
18:00
The Sound FX Guy
Рет қаралды 10 М.
HTF do I? Use the SaveGame Object in Unreal Engine 4
10:02
Mathew Wadstein Tutorials
Рет қаралды 48 М.
Why Majora's Mask's Blue Dog Took 25 Years to Win the Race
21:04
Vidya James
Рет қаралды 2,5 МЛН
Unreal Engine 4 Tutorial - Saving & Loading Pt.2 Level States
22:52
How to ACTUALLY Load Levels in Unreal and Make Loading Screens
16:31
The Game Dev Cave
Рет қаралды 64 М.
UE4 - Tutorial - Custom Collisions! (Request!)
15:48
Dean Ashford
Рет қаралды 155 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН