Forum rules - please read before posting.

Fourth Wall elements

Without the use of saves, or even between them, is it possible to create variables or events that change based on if the player opens and re-enters the game? Or like if you talk to a character but their dialogue changed based on having previously played before.

Comments

  • Global Variables can be linked to Options Data, meaning their value will be independent of save game files.  This is normally intended for things like screen resolution etc, but I imagine you could use it for this purpose instead.
  • Cool, managed to get something working this way. On the same note, where are PlayerPrefs stored by your game? I know save files are stored under "LocalLow/CompanyName/GameName," but I want to know if it's possible to modify a PlayerPrefs-related file to manually alter these variables. That way the player might have to actually modify the data a bit to find a secret room or something.
  • Modify the PlayerPrefs file itself?  The location is dependent on the chosen platform, see this page.  AC stores different keys based on the current player profile - so a player can switch profile and have their own option settings etc.  The AC.Options.GetPrefKeyName function is used to generate the key's name.
  • Oh man, it's stored on Windows as a reg key. So that makes it even more difficult. Hm, well if this isn't the optimum way, I'm assuming that Unity has a way to store this kind of data outside of AC as well as create custom files to read off of and whatnot.
  • AC uses the Unity-provided PlayerPrefs static functions to read and write PlayerPrefs data, and save files are stored in the persistentDataPath directory - which again is platform-dependent.  If you're looking for more general advice on reading and writing files with Unity, you might want to ask on Unity's official forums.
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.