Forum rules - please read before posting.

Best way to add/manage unlockable content

edited August 2024 in Technical Q&A

My game doesn't have save slots and I use exclusively the autosave to keep track of the player progress.
I have a "main_menu" scene which is shown when the game starts and when the player quits the gameplay. In the main_menu there's a "continue" button that will load the autosave and bring the player to the last visited scene in the game proper.
I want to add some unlockable contents that can be viewed from the main_menu. The player may take some action during their gameplay that unlocks those contents, so when next time they visit the main_menu they'll see the corresponding contents unlocked.

The question is: how do I make main_menu "aware" of the contents that have been unlocked in the previous session? The status of the content (locked/unlocked) is saved like everything else in the autosave slot. When the game is initially started though, the main_menu doesn't load the last autosave, so the contents are all in their default status (locked)

I tried using the "selective loading" action when visiting the main_menu (including when the game starts), in an attempt to load exclusively the variables that would unlock the contents. But even by unchecking everything, the game will change scene and bring the player to the last scene they visited while playing. So it seems I'm in a bit of a stalemate: the data I need to unlock the contents are stored in the save slot, but I can't load it or the player will be automatically be thrown in the normal gameplay.

Is there a proper way to go about this?

Comments

  • For this situation, you can rely on Global Variables that are linked to Options Data.

    When a variable is linked as such, its value will be stored as part of the Profile - rather than in any save-game associated with it.

    This is normally used for custom options, but can also be used for unlockable content.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.