I am creating a game which contains level unlocking system .and had created a save game object and represented levels as variable and also i had created a widget for levels and had disabled all levels except level 1 and i had created binding in (is enable) function. but there is a problem in the setup that when i complete level 1 then level 2 gets unlocked and when i complete level 2 then level 3 gets unlocked and after completing level 3 level 4 gets unlocked but when i again play level1 then only level 2 gets unlocked. and if i play level 2 again instead of level 1 then levels which are unlocked remains unlocked . can anyone help me out .please refer to the screenshots attached below. thanks in advance
You only need to create the save game object once. After that, you have to load it and modify before saving:
See also :
I need to do this scripting in level blueprint or in widget blueprint ??
No Im creating a new save game in level 1 only (create save game object ) and in other levels I’m using load game from slot . I’m trying to explain that game gets reset after I play play level 1 again . But in other levels it is not happening because I had used create save game object in level 1 . So I think that I need edit level 1 scripting only ??
I did this scripting in level1 as their only i am creating save game object . but it is not working . i think that i also need to edit this trigger box of level 1(please refer to attached file )
So I did as you said but it didn’t worked so I think I need to do some changes in the trigger box. ??
Anywhere you want. But your probably is every time you write to the save game, you’re making a new save game, which overwrites what you already had…
Yes, right. Once you have the save game, you never need to make it again, unless you want to lose everything.
This wont work, because every time they walk into the trigger box, it will bin any save game info and make a new one.
You make the save game very very early on, and never make it again.
I don’t know what you’re structure is, but anything that runs when the game is starting is a good place.
Another option is to put the whole save game access thing into macros. That way you don’t have to think about it. The macro can check if it exists, if it doesn’t make one, if it does read it, etc.
Sorry, this trigger box thing will be ok, as long as they come across it at the end of level 1 only, and it never happens again.
Is it possible to go back to level 1 after going to level 2 etc?
I finally solved this after 2 hours . so this is what i did in level 1 blueprint (refer to attachment). thank you so much @clockworkocean for your help.
Yes! Much better